Skip to content

๐Ÿšš A delivery API to store and provide delivery data.

License

Notifications You must be signed in to change notification settings

elgsantos/delivery-api

Repository files navigation

Delivery-API

Build Status Coverage Status js-semistandard-style tested with jest

๐Ÿšš A delivery API to store and provide delivery data.

Built using TDD, clean architecture, Factory pattern and dependency injection.

Table of Contents

Getting Started

Prerequisites

Before installing, download and install Node.js.

Installation

Clone the project with:

$ git clone https://github.com/elgsantos/delivery-route-api.git

Get in the path project, then install the dependencies with:

$ npm install

Install Jest globally to run tests

$ npm install jest -g

To test and commit files using the repository standard, install semistandard globally

$ npm install semistandard -g

If local, create a .env file on project's root directory containing your MONGO_URL:

MONGO_URL = "your_url"

Usage

You can start the server with:

$ npm start

To run and watch unit tests, use:

$ npm run test:unit

To run and watch integration tests, use:

$ npm run test:integration

Documentation

Read the documentation.

Built With

Tools used

The following tools were used in the development of the API:

Contributing

Feel free to develop and contribute, and send your pull requests. ๐Ÿ˜Š

  • The semistandard should be used, to ensure that the code will follow the same standard.
  • Before each commit, husky runs tasks to standardize the code correctly.
  • Tests are performed on the staged files, and if the tests are not ok, the commit will be canceled.
$ git commit -m "some awesome feature"

husky > pre-commit (node v12.4.0)
โ€ผ Some of your tasks use `git add` command. Please remove it from the config since 
all modifications made by tasks will be automatically added to the git commit index.

Preparing... [started]
Preparing... [completed]
Running tasks... [started]
Running tasks for *.js [started]
semistandard --fix [started]
semistandard --fix [completed]
npm run test:staged [started]
npm run test:staged [completed]
git add [started]
git add [completed]
Running tasks for *.js [completed]
Running tasks... [completed]
Applying modifications... [started]
Applying modifications... [completed]
Cleaning up... [started]
Cleaning up... [completed]
[master f252e10] server and database configuration
 23 files changed, 334 insertions(+), 32 deletions(-)
  • Tests are also performed before push, so code will be pushed if 100% is passing.
$ git push origin master

husky > pre-push (node v12.4.0)
...

Test Suites: 9 passed, 9 total
Tests:       40 passed, 40 total
...

Author

License

Distributed under the MIT License. See LICENSE for more information.

About

๐Ÿšš A delivery API to store and provide delivery data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published