/skills

This is a REST API Microservice to manage Skills, built with Node.js (Express.js Framework) that uses MongoDB.

Primary LanguageJavaScript

Skills

This is a microservice to store skills data.

Requirements

  • npm
  • Node.js (12+)

Local Node 13 and npm installation (for Linux Mint)

curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt install nodejs

Running with Docker (local)

Please, check docs/installationWithDocker.md

Technologies

Usage

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

Rules

  • 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)

Routes

Please check docs/routes.md to get all routes and examples of requests.

Testing

Run

npm run test

More

  • 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
  • This application runs in 3000 port as default. To change it, change APP_PORT in .env file above (as .env.example file)