Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 718 Bytes

README.md

File metadata and controls

50 lines (40 loc) · 718 Bytes

Initiating the project with Typescript

  • npm init -y
  • npm install express
  • npm install -D @types/express @types/node ts-node-dev typescript
  • npx tsc --init

Add Prisma js

Prisma

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