Back end of the coding challenge for Medwing.
This is a simple backend done with NodeJs and Express.
It contains the CRUD for creating Markers that will be lately displayed on the map and also save them on a DB using mongoose.
Front end repository HERE
Live demo of the project HERE
Clone the repository and install the dependencies:
git clone https://github.com/MikeLunDev/geocodingChallenge-BE.git
cd geocodingChallenge-BE
npm i
Run a mongo istance if you have mongo as a service:
mongod
Create a .env file with:
- CONNECT_STRING_DB // will be the the mongo atlas connection string
- WHITE_LIST_ONLINE //address online that is whitelisted by cors() (not mandatory)
- WHITE_LIST_LOCAL //localhost address that is whitelisted by cors() (not mandatory)
Run the server:
npm run dev
Test are made with jest and supertest.
They are end to end testing the whole application.
To run test start the mongo database istance: (if you don't have mongo as a service you don't need this)
mongod
Run the tests:
npm run test
Docs can be found HERE. They are written with OpenApi 3.0.1 leveraging on swagger-ui-express and yamljs used to run yaml file in a NodeJs environment.