- docker
- docker-compose
- IDE (Vscode etc.)
- install docker
- install docker-compose
- run
docker-compose up
in the first terminal - run
curl http://0.0.0.0:13000/users
in another console
- almost all configurations for this application we get from the environment variables.
let mongoHost = process.env.MONGO_HOST;
- all logs we send to the
stdout
console.log(`Connecting to url for ${attempt + 1} attempt: ${url}`);
-
we logging everything, errors, success, put, get, delete, all operations must be written to the
stdout
-
health status for our application for the database:
app.get('/readiness', (req, res) => { let status = isReady ? 200 : 500; res.sendStatus(status); });
and for application:
app.get('/health', (req, res) => { res.sendStatus(200); });