Deal App Matching System
A Matching System that match Property Request with Ads.
To get a local copy up and running follow these simple example steps.
- Node (Download here!)
- MongoDB (Download here!)
- Nodemon (for development mode)
npm install -g nodemon
1. Fork this repository 🍴
2. Clone your forked repository to your local system 👥
git clone https://github.com/<your-username>/deadealapp-assessment.git
Or Download and extract the zip file.
You need to make your own .env
and place at root with the following structure.
NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/DealApp
JWT_SECRET=0000000
JWT_EXPIRE=30d
JWT_COOKIE_EXPIRE=30
NODE_ENV
: It should be"production"
in order to run the api on production otherwise use"development"
PORT
: Your api hosting portMONGO_URI
: Your database pathEg:
"mongodb://localhost:27017/DealApp"
If you're hosting on your localhost server.JWT_SECRET
: Your json web token secret key.JWT_EXPIRE
: The period token can last before expiring expressed in seconds or a string describing a time spanEg:
60
,"2 days"
,"10h"
,"7d"
. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default ("120"
is equal to"120ms"
).
To build and run the application using Docker, use the following commands:
docker-compose build
docker-compose up
1. Install NPM packages ⬇️
npm install
2. Run! 🏃♂️
npm start
3. Or Run on Dev! 🏃♂️
npm run dev
To backup the database locally, you can use seed.js
:
npm run seed
or you can use mongorestore at root:
mongorestore --db DealApp ./backup/DealApp
To run test:
npm test
You can access the Swagger documentation at:
http://localhost:5000/docs