Provides user authentication for other services. This is a microservice using NodeJS with Express and MongoDB.
nvm use
npm ci
npm run tests
You can startup the DB using a Docker image as follows:
docker build -f Dockerfile.mongoDB . -t authmongodb
docker run --publish 27017:27017 authmongodb
And then just start the server:
npm run serve
- TEST:
docker compose --env-file .env-test up -d --wait --wait-timeout 60 --build
- DEV:
docker compose --env-file .env-dev up -d --wait --wait-timeout 60 --build
(also used on CI) - PROD:
docker compose up -d --wait --wait-timeout 60 --build
(.env file loaded by default)
The intention is to have a high code coverage, but not more important is to have the core features well tested (unit and integration).
Go to: Testing REAMDE
- Github Actions for CI/CD running workflos on main branch.
- each commit on main builds a new Docker image and push it to the Registry.
- each commit on every branch runs tests, linter, and also integration_tests using POSTMAN and docker-compose in the Github Action VM.
- main branch is be protected, restricting devs to merge a broken PR. Saving the CD workflow to build broken images.
- Node JS with Express and vanilla Javascript to build the Client API.
- Unit testing with Jest.
- Eslint to keep code consistency.
- Docker Images repositories:
- API
- TODO: DB Backup