Skip to content

Jeronimo-MZ/services-api

Repository files navigation

Services API

Node CI codecov Mutation Testing Mutation testing badge

About

An API to manage Services Provided to Customers made using the good practices of Software Development.

Getting Started

Installation

You need to install Node.js and Yarn first, Then you can download this repository or clone it running this command in your terminal:

git clone https://github.com/Jeronimo-MZ/services-api.git

Or, if you want to use SSH , clone this repository running:

git clone git@github.com:Jeronimo-MZ/services-api.git

Then install the project dependencies running:

yarn install

Run project

Before running the project you should start a MongoDB server locally. If you want to use a remote MongoDB server, set the MONGO_URL environment variable

Then you can start the development server running the following command:

yarn dev

Or compile the code and run the js code

# compile the code
yarn build
# start server
yarn start

Docs

You can find the api routes documentation at /api/docs route. if you are running in localhost it should be http://localhost:3333/api/docs.

Tests

This project is covered by tests, if you make any changes to the code, you can execute them using the following commands:

# to run Unit Tests
yarn test:unit

# to run Integration Tests
yarn test:integration

# to run all tests
yarn test

# to run all tests with more details
yarn test:verbose

# to run all tests and generate coverage reports
yarn test:ci

You can also run mutation tests using stryker using this command:

yarn test-mutation

WARNING: Mutation tests are much slower than the others and can slow down your computer, i recommend you to close other programs before running them.

Author

👤 Jerónimo Matavel

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Jerónimo A. Matavel Jr..
This project is MIT licensed.

Made with 💜 by Jerónimo Matavel🚀