a petproject to play with ExpressJS
Technology stack:
- Database: MongoDB
- Server: Node.js, Express, Mongoose
- Client: ReactJS, AntD
- MongoDB ver. 6.*
- Node.js 18.*
Create a new MongoDB. using mongo shell, connect to your data base and copy-paste script from https://github.com/MariiaNebesnova/gatewaysRest/blob/main/addTestData.js - to add test data.
- clone this repo or download source code to your local machine
- add
.envfile according to.env.example - run
npm startfrom the root directory
To open client application open http://localhost:<YOUR_PORT>/ in your browser.
Server app already contains a builded client.
- tests were added as an example. Because there's no any significant buisness logic to cover with test that will make more sence;
- according to Dependency inversion principle, it would be better to wrap
antdimports with own components, but the result will be a huge amount of code that is an overkill for such a small app. Howewer, I've done it formongoosein server application, because it doesn't look monstrous there; - client application can be runned and debugged separately, using
npm startscript fromgateway-clientdirectory. but you still need to start server on 8080 port, or changeproxyingateways-client\package.json; - AntD was used because it provides a complete UI components and allows to create a prototype without a row of
.css. And it's not so heavy as MUI.