riosvictor / nestjs-api-tutorial

NestJS REST API with Prisma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

COMMANDS

create a new project nest new create a new module nest g module up postgres database by docker docker-compose up dev-db add dependencies yarn add -D prisma yarn add @prisma/client init prisma config npx prisma init run migrate npx prisma migrate dev create type from models npx prisma generate open dashboard database npx prisma studio add prisma module and prisma service nest g module prisma nest g service prisma --no-spec add dependencies yarn add @nest/config yarn add argon2 yarn add class-transformer class-validator add dependencies yarn add @nestjs/passport @nestjs/platform-express yarn add passport passport-jwt yarn add -D @types/passport-jwt add dependencies yarn add -D pactum yarn add -D dotenv-cli add user service nest g service user --no-spec add bookmark controller and service nest g controller bookmark --no-spec nest g service bookmark --no-spec

to install dependencies yarn && npx prisma generate to run project yarn db:dev:restart && yarn start:dev

About

NestJS REST API with Prisma


Languages

Language:TypeScript 96.7%Language:JavaScript 2.7%Language:Shell 0.6%