This is a starter project for building Node.js applications using clean architecture principles and TypeORM.
- Nodejs 16.x or later
- npm or yarn
- your prefer database: mysql, mariadb, postgres, sqlite, mssql, oracle
-
Clone this repository
git clone https://github.com/Z3r0J/nodejs-clean-architecture.git <your-project-name>
-
Install the dependencies
cd <your-project-name> npm install or yarn install
-
Database Configuration
Create an
.env
file base on the.env.example
filecp .env.example .env
-
Start Application
npm start
-
Go to https://localhost:3000/
.
├── src/
| |--application/ #
| | |--dtos/ #
| | |--helpers/ #
| | |--interfaces/ #
| | |--services/ #
| |--config/ #
| |--domain/ #
| | |--entities/ #
| |--error-handling/ #
| |--infrastructure/ #
| | |--repositories/ #
| | |--typeorm.config.ts #
| |--interfaces/ #
| | |--controllers/ #
| | |--middlewares/ #
| | |--routes/ #