An open API service indexing awesome lists of open source software.

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

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
```