A simple NodeJS webapp that returns roman numeral value on query.
HTTP Server built using ExpressJS. Roman numeral conversion as per Wikipedia page: Roman numerals.
Yarn for building.
- nodejs
- yarn
$ NODE_ENV=production # set NODE_ENV=production (in Windows)
$ yarn run start
Run server with nodemon to reload server on new changes to the source
$ yarn run dev
For client
$ curl -i "http://127.0.0.1:8080/romannumeral?query={integer}"
$ yarn test
Server in prod:
$ docker-compose -f docker-compose.prod.yml up
Server in dev:
$ docker-compose up
Tests:
$ docker-compose run dev-app yarn test
$ docker inspect <container-name> --format='{{json .State.Health}}'
Logs printed to host syslog
Metric exposed on localhost:8080/metrics via express-prom-bundle
Monitoring can be added through this exporter by using Prometheus/Grafana