- This repository contains code for a basic API with users and authentication.
- It has automated end to end tests which prove the authentication works
- These tests require a postgres database (otherwise they wouldn't be end to end)
- It must run the tests and fail if they fail (commands below)
- Use a tool, provider, or service of your choice
- It should run a DB to support the test run (docker exaample included)
- Submit your work in the form of configuration files, scripts, etc (preferably via git)
- If the submition is successful, then you will be asked to demonstrate the pipeline in an interview
- Install dependencies
npm install
- Start a local DB (example via docker-compose)
docker-compose -f db.docker-compose.yml up
- Run the test command (setting some environmental variables, with the port from the docker compose example shown here)
API_BASE_PATH=/api API_SECRET=foo DB_URL=postgres://test:password@127.0.0.1:15432/test npm run test
- We want to know why you made certain choices such as splitting this up over multiple tasks/stages vs using a single task or stage
- We want to know that you understand every line of code and docs you submit
- Keep it simple: This task can be delivered in 1-4h depending on your approach and experience. We are not expecting you to install the latest and greatest new tool from scratch or learn a new hyped technology, but rather use things you know and use every day.
- Infrastructure as code please (minimise click+point setup)
The code given here is by no means production ready and has some deliberate oversights. Point out any of these which are clear to you (things like failing to follow best practices, or security concerns).