This API is an Users CRUD built with Node.js (Express.js + Mongoose).
First of all, make a copy of .env.example
in config folder and name it just .env
Make sure that you have completed the environment, then:
- Build docker image with:
docker build . -t henriqueyun/users-1-api:latest
# or run the shortcut script
./docker/build.sh
- Run it with:
docker compose -f docker/docker-compose.yaml up
# or run the shortcut script
./docker/docker-up.sh
There are some tests built with Jest, you can run it with yarn install && yarn test
.
The tests use Mongo Memory Server to run independently of a MongoDB server. There is Github Action running them on main branch push/pull_request.
You could check the API Docs, built with Swagger, after running the app. through the /api-docs
endpoint.