- npm init -y
- npm install express
- npm install -D @types/express @types/node ts-node-dev typescript
- npx tsc --init
npm install --save-dev prisma
npm install @prisma/client
tsconfig.json
{
"compilerOptions": {
"sourceMap": true,
"outDir": "dist",
"strict": true,
"lib": ["esnext"],
"esModuleInterop": true
}
}
Now we can initialize prisma with sqlite:
npx prisma init --datasource-provider sqlite
Edit schema.prisma then:
npx prisma db push
.gitignore
node_modules
/.cache
/build
/public/build
/prisma/dev.db
.env