This repo contains the code required to complete the Stepsize backend exercise.
Some scripts are included to make setup easier. The following commands will clone this repo and run the setup scripts.
git clone https://github.com/Stepsize/backend-exercise/ stepsize-backend-exercise
cd stepsize-backend-exercise/tools
./setup.sh
cd ../
Services can be started using
docker-compose up --build
The dispatch service is exposed on http://localhost:3001
You can scale the worker service up / down by doing.
docker-compose up --build --scale=worker=X
Replace X with the number of replicas you would like.
The containers are using ts-node-dev
and source directories are mounted inside the containers, this means that services will restart when you make code changes. If you install new dependencies containers will need to be rebuilt.
If you prefer to not restart services on code changes you can modify the start commands in individual services package.json
files to use ts-node
instead.