Skip to content

Instantly share code, notes, and snippets.

View chrisvasqm's full-sized avatar

Christian Vasquez chrisvasqm

View GitHub Profile
@chrisvasqm
chrisvasqm / tsconfig.json
Last active May 25, 2024 16:28
Sample tsconfig.json file to convert a JavaScript project to TypeScript (Tip: Remove the "module" property from your package.json if you have it)
{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2020",
"sourceMap": true,
"outDir": "dist"
},
"include": [
"*"
services:
postgres:
image: postgres:16.3-alpine3.20
container_name: appname
ports:
- '5432:5432'
environment:
POSTGRES_DB: appname
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
@chrisvasqm
chrisvasqm / Dockerfile
Last active June 6, 2024 20:11
Sample Dockerfile for a Node backend using Prisma and pnpm
FROM node:20.14.0-alpine3.20
WORKDIR /app
COPY . .
RUN npm install -g pnpm
RUN pnpm install
RUN pnpm generate
RUN pnpm migrate
RUN pnpm build
EXPOSE 3000
USER node