dt new -t node-mvc
this is an official dt template that generates a nodejs api using the mvc pattern
After installing the dt cli, create a folder with the name of your api and enter it, for example:
mkdir my-node-api
cd my-node-api
Then use this template through the cli:
dt new -t node-mvc
PORT=3001
NODE_ENV = local
To summarize this template will install and configure: babel, commitlint, typescript, jest, cz-conventional-changelog, eslint, husky, tsconfig-paths, auto create release...
Directory output tree:
├── LICENSE
├── README.md
├── __tests__
│ └── TestImportation.test.ts
├── babel.config.js
├── commitlint.config.js
├── jest.config.ts
├── package.json
├── prettier.config.js
├── src
│ ├── @types
│ │ └── index.d.ts
│ ├── modules
│ │ └── user
│ │ └── infra
│ │ └── http
│ │ ├── controllers
│ │ │ └── UserController.ts
│ │ └── routes
│ │ └── user.routes.ts
│ └── shared
│ └── infra
│ └── http
│ ├── app.ts
│ ├── routes
│ │ └── index.ts
│ └── server.ts
├── tsconfig.json
└── yarn.lock