Skip to content

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.

Notifications You must be signed in to change notification settings

maismin/work-orders-api

Repository files navigation

work-orders-api

Table of Contents

About the Project

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.

Getting Started

Prerequisites

  • npm
npm install npm@latest -g
  • MongoDB

Install the local server or sign up for cloud service

env Setup

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

Installation

  1. Start up Mongo daemon (for Linux)
$ sudo service mongod start
  1. Clone the project, cd to it, and run
$ npm install
  1. Start the backend with
$ npm run dev
  1. Use Postman to interface with the API at (http://localhost:5000)

Usage

Populate Database

Use the following command to initialize the database

$ node seeder.js -i

Use the following command to clean the database

$ node seeder.js -d

API

Deployed to Heroku

API Documentation

Deployed to Postman

Tests

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

Contact

Simon Mai - [email protected]

Project Link: https://github.com/maismin/work-orders-api

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published