# nest-template **Repository Path**: buqiyuan/nest-template ## Basic Information - **Project Name**: nest-template - **Description**: 个人nestjs后端常用配置基本模板 - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 3 - **Created**: 2020-07-12 - **Last Updated**: 2023-03-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![Nest](assets/logo.png) ## Description Starter kit project made with [Nest](https://github.com/nestjs/nest) that demonstrates CRUD user, JWT authentication, CRUD posts and e2e tests. ### Technologies implemented: - [sequelize-typescript](https://github.com/RobinBuschmann/sequelize-typescript) (ORM) + [MySQL](https://www.mysql.org/) - [JWT](https://jwt.io/) - [Jest](https://jestjs.io/) - [Swagger](https://swagger.io/) ## Prerequisites - [Node.js](https://nodejs.org/) (>= 10.8.0) - [npm](https://www.npmjs.com/) (>= 6.5.0) ## Installation ```bash $ npm install ``` ## Setting up the database for development and test PostgreSQL database connection options are shown in the following table: | Option | Development | Test | | -------- | ----------- | --------- | | Host | localhost | localhost | | Port | 3306 | 3306 | | Username | root | root | | Password | root | root | | Database | nest | nest_test | ## Running the app ```bash # development $ npm run start # watch mode $ npm run start:dev # production mode $ npm run start:prod ``` ## Test ```bash # e2e tests $ npm run test ``` ## Other commands ```bash # formatting code $ npm run format # run linter $ npm run lint # create database $ npm run db:create # run migrations $ npm run db:migrate # run seeders $ npm run db:seed-dev # reset database $ npm run db:reset # drop database $ npm run db:drop ``` ## Swagger API docs This project uses the Nest swagger module for API documentation. [NestJS Swagger](https://github.com/nestjs/swagger) - [www.swagger.io](https://swagger.io/) Swagger docs will be available at localhost:3000/documentation