https://github.com/zayniddindev/clean-architecture
Clean architecture with Node.js and Express.js
https://github.com/zayniddindev/clean-architecture
Last synced: over 1 year ago
JSON representation
Clean architecture with Node.js and Express.js
- Host: GitHub
- URL: https://github.com/zayniddindev/clean-architecture
- Owner: zayniddindev
- Created: 2023-07-11T07:23:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T12:06:08.000Z (almost 3 years ago)
- Last Synced: 2025-01-08T18:49:26.178Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Clean architecture with Node.js and Express.js
Inspiration
This project's main purpose is to show how to seperate the layers of backend in order to develop a clean architecture. The project is still in WIP and if you have some ideas to make it cool, you are welcome to fork and open a new PR!
Structure
```lua
src ---- |
common --- |
ds.js - Common Data Source (MySQL, MongoDB)
event.js - Event Emitter used throughout the project
model.js - Base model class
config --- |
index.js - Env variables
user --- |
application - Handlers (business logic goes here);
domain - Domain entities (models, exceptions, types, events);
infra - Infrastructure (presentation, persistence)
```
How to run?
```bash
$ yarn install
```
```bash
$ yarn start
```