🚧 Checkout nestjs-prisma-starter
Setup Prisma2 CLI
npm install -g prisma2Lift is used to manage the schema and migration of the database.
Saving the migration of the database:
prisma2 lift savePerform the database migration:
prisma2 lift upPhoton 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 generateExecute the script with this command:
npm run seedThe 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 installnpm run start
# or in watch mode
npm run start:devGraphql is available localhost:3000/graphql and Swagger for Rest Api is available localhost:3000/api.