This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as PgDrizzle from "@effect/sql-drizzle/Pg"; | |
import { PgClient } from "@effect/sql-pg"; | |
import { Config, Effect } from "effect"; | |
import * as schema from "~/lib/server/schema"; | |
const PgLive = PgClient.layerConfig({ | |
url: Config.redacted("DATABASE_URL"), | |
}); | |
export class DrizzleClient extends Effect.Service<DrizzleClient>()("app/DrizzleClient", { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lib/server/sse/event-bus.ts | |
import { EventEmitter } from "events"; | |
import { logger } from "~/lib/logger/logger"; | |
interface SessionEvent { | |
type: string; | |
data: Object; | |
timestamp: string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"functional component": { | |
"prefix": ["func, fnc", "component", "fc", "func"], | |
"description": "react functional component", | |
"body": [ | |
"import React from 'react'", | |
"type Props = {}", | |
"export const $TM_FILENAME_BASE: React.FC<Props> = () => {", | |
"\treturn (", | |
"\t\t<div>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:14-alpine as builder | |
WORKDIR /app | |
ENV NODE_ENV=production | |
COPY package.json package-lock.json tsconfig.json ./ | |
COPY src ./src | |
RUN npm ci --also=dev | |
RUN npm run build:ts | |
RUN npm prune --production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e2e | |
fixtures | |
*.test.* | |
node_modules | |
.next | |
.env | |
Dockerfile | |
.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { UserProvider } from "@app/context/user-context" | |
import "@app/styles/font.css" | |
import "@app/styles/global.css" | |
import "@app/styles/reset.css" | |
import { NextComponentType } from "next" | |
import App, { AppContext, AppInitialProps, AppProps } from "next/app" | |
import Head from "next/head" | |
import { parseCookies } from "nookies" | |
const CustomApp: NextComponentType<AppContext, AppInitialProps, AppProps> = ({ Component, pageProps }) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require(`path`) | |
const { createFilePath } = require(`gatsby-source-filesystem`) | |
exports.createPages = async ({ graphql, actions }) => { | |
const { createPage } = actions | |
const blogPost = path.resolve(`./src/templates/blog-post.js`) | |
const postsPromise = graphql( | |
` | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const paymentMachine = Machine({ | |
id: 'payment', | |
initial: 'method', | |
states: { | |
method: { | |
initial: 'cash', | |
states: { | |
cash: { on: { SWITCH_CHECK: 'check' } }, | |
check: { on: { SWITCH_CASH: 'cash' } }, | |
hist: { type: 'history' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require("react") | |
exports.onRenderBody = ({ setPostBodyComponents }) => { | |
if (process.env.NODE_ENV !== `production`) { | |
return null | |
} | |
return setPostBodyComponents([ | |
<script | |
key="simpleanalytics" | |
async |
NewerOlder