This backend application allows for the creation of workers and work-orders (tasks). Workers can be assigned to and multi-task many work-orders concurrently. A work-order has a max limit of five workers at a time.
- npm
npm install npm@latest -g
- MongoDB
Install the local server or sign up for cloud service
Create a config.env
file in the config
folder with the following
DEV_MONGODB_URI=mongodb://localhost:27017/work-orders-api
TEST_MONGODB_URI=mongodb://localhost:27017/work-orders-api-test
PORT=5000
- Start up Mongo daemon (for Linux)
$ sudo service mongod start
- Clone the project,
cd
to it, and run
$ npm install
- Start the backend with
$ npm run dev
- Use Postman to interface with the API at (http://localhost:5000)
Use the following command to initialize the database
$ node seeder.js -i
Use the following command to clean the database
$ node seeder.js -d
Deployed to Heroku
Deployed to Postman
Run the following command for API tests
$ npm run test
Run the following command for test coverage
$ npm run test -- --coverage
From the project root
directory, navigate to /coverage/lcov-report/index.html
for the HTML report
Simon Mai - [email protected]
Project Link: https://github.com/maismin/work-orders-api