Project build with Express framework and MongoDB database. Client side build with React.js.
- Install Node.js >= 10.x
- Copy this repo with
git clone
cd server && npm install
- Copy content of
.env.example
to.env
- Run
npm run seed
to generate fake data - Run
npm run dev
orstart
cd client && npm install
- Copy
.env
file from.env.example
- Run
npm run start
- Change structure of database with Mongo models
- Add ORM repositories
- Change controllers or add services
- On loading check if all ENV variables exist
- Add validation layer for documents
- Change
admin.middleware.js
- Controllers work with requests and responses. Validating incoming data.
- Services (models) work with repostories, manage already validated incoming data from controllers.
- Repositories work with database.
For our project we do not need so many abstraction layers. Let's put our controllers logic into services. Probably, in future, we will fix it.