Nest Prisma2 repo
🚧 Checkout nestjs-prisma-starter
Setup Prisma2 CLI
npm install -g prisma2
Lift is used to manage the schema and migration of the database.
Saving the migration of the database:
prisma2 lift save
Perform the database migration:
prisma2 lift up
Photon is a type-safe database client auto-generated based on the data model.
To generate Photon execute, this will alwayse be executed after npm install
:
prisma2 generate
Execute the script with this command:
npm run seed
The Nestjs CLI can be used to generate controller, services, resolvers and more.
npm i -g @nestjs/cli
Install the dependencies for the Nest server in the folder:
npm install
npm run start
# or in watch mode
npm run start:dev
Graphql is available localhost:3000/graphql and Swagger for Rest Api is available localhost:3000/api.