A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Check out a few resources that may come in handy when working with NestJS:
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
- Looking for a job, or have a job to offer? Check out our official Jobs board.
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.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.
This command create a folder with the resource and dto
nest g res resourcename
Install the Prisma
tool will enhance the communication with the databases
creating queries in a easier way
npm i prisma -D
or use
npm install prisma --save-dev
Now to add some models for the Domain we are using we will use this bash command to execute the inner prisma configurator and create a folder for the provided database, for further info on compatibility checkout the recipe in NestJS recipes prisma
npx prisma init --datasource-provider {database}
Initial migrations will be done using this command. For further review and version check the documentation related for the prisma migrations documentation in NestJS Migrations Prisma
An initial run of this command can generate the needed files for further use or starting with a clean database. Obviously use it wisely, a wrong command could or usage can freak the usage of it
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
npx prisma migrate dev --name init
To visualize the database schemas use the next command to enhance the visibility without us
npx prisma studio
If needed some of this schemas it can use multiple schemas for further configurations don't forget to read How to use Prisma ORM with multiple database schemas
Backend
.
├── dist
├── node_modules
├── src
│ ├── sample (resources)
│ ├── products (resources)
├── internal
│ ├── adapters (Bridges to external systems, e.g., database, message queue)
│ ├── domain (Core business logic, entities, value objects)
│ ├── events (Event definitions and handling logic)
│ ├── handlers (Functions that process events)
│ ├── auth (This directory will houyse all the ocmponents related to access control and authorization)
│ ├── pkg
│ │ └── eventbus (Implementation of your event bus)
│ └── services (Business logic coordinating domain and adapters)