This is a microservice to store skills data.
- npm
- Node.js (12+)
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt install nodejs
Please, check docs/installationWithDocker.md
- Express Framework
- Mongoose
- Chai and Mocha for testing
- ECMAScript 6
- JavaScript Standard Style, ESLint and Prettier
After cloning this repository, run:
npm install
Start the application:
npm run start
Use Postman to use the API or any API consumer (such as Insomnia). If you prefer, you can even use the curl command.
If you are using Postman, just import this file with examples of requests: docs/skills.postman_collection.json
- A skill should consist of:
- id (auto-generated by the system)
- name (required)
- level (required, only accepts the following values: JUNIOR, SENIOR or EXPERT)
- createdAt (auto-generated by the system when it was created the first time)
- updatedAt (auto-generated by the system when it was updated the last time)
Please check docs/routes.md to get all routes and examples of requests.
Run
npm run test
-
This application uses an in-memory database as default. Once restarting the app, all data will be lost.
-
Optionally, it's possible to change to a persistent MongoDB database. Just copy the file below and define the environment variable MONGO_URI
cp -v .env.example .env
- It's possible to use any MongoDB server (localhost, local server, a Docker container or in cloud - Try Free MongoDB Cloud)
-
-
This application runs in 3000 port as default. To change it, change APP_PORT in .env file above (as .env.example file)