Hot-reloading development server
Use case
As a backend developer, I would like to have a hot-reloading server for development work so that I do not need to rebuild and restart the Express docker image every time I make changes to the code.
Current state
The current backend scripts only build an Express server by copying the source files into a Docker image. Then the backend server and test harness need to be restarted to try out the changes (done with docker-compose).
Proposed solution
This will be somewhat similar to the frontend dev/production server setup in the GuestInfoFrontend frontend-refactor branch
Development server
- We can use nodemon to provide a locally-running express server the watches for changes in the src directory and reloads.
- We need a new docker-compose file that will start up MongoDB and RabbitMQ as the test harness, with appropriate virtual networks to connect them together and to expose the MongoDB server to the nodemon express server.
Production server
- We will still need the current scripts (or similar) to build the Docker image with the Express source embedded.
- Probably we will not need the docker-compose file that starts up the test harness because no one will want to run it that way locally. But maybe it should be kept around for local testing of the production version?