Node.js framework NestJS project structure
# 1. node_modules
$ npm i
# 2. edit env config
$ vim ./config/*.json
# 3. database model entity generate
$ npm run entity dbname
# OR
$ npm run entity dbname skip
$ npm run build:entity
If you use multiple databases, modify them.
$ npm run start:dev
# define NODE_ENV yourself
$ npm run build
# OR
$ npm start
+-- bin // Custom tasks
+-- config // Env config files for `config` module
+-- dist // Source build
+-- public // Static Files
+-- src
| +-- common // Nest Module, global
| | +-- controllers // Nest Controllers
| | +-- decorators // Nest Decorators
| | +-- dto // DTO (Data Transfer Object) Schema, Validation
| | +-- filters // Nest Filters
| | +-- guards // Nest Guards
| | +-- interceptors // Nest Interceptors
| | +-- interfaces // TypeScript Interfaces
| | +-- middleware // Nest Middleware
| | +-- pipes // Nest Pipes
| | +-- providers // Nest Providers
| | +-- * // models, repositories, services...
| +-- entity // TypeORM Entities generated by `typeorm-model-generator` module
| +-- * // Other Nest Modules, non-global, same as common structure above
+-- test // Jest testing
+-- typings // Modules or global type definitions
- See app, app.module
- Database
- Module Router
- Static Files
- Validation
- Global Authenticated Guard
- Global Exception Filter
- Global Logging Middleware
- Session Login with Passport
- Custom Logger for Production
- AWS SDK Example
- Controller Routes
- Database Query Sample