Skip to content

cotrin/inventory-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published