This is one of the two entry points for the SundayPeak backend service
Rivers collects data, sends it to Water to process and be handled before sending it back to the client.
This layer is seperated from Water because both Rivers and Couloirs talks to the service layer and needs data for different purposes
- Routes are handles in the
Routesdirectory - They are processed by the methods in
Hanlders Handlersmostly just makes sure the data is formatted in a way thatWatercan handle it and then sends it to the service for processing- It takes the data returned from the service and returns it back to the client in a response structure
- I really want to make all of these layers TypeScript so that I'm not constantly going back and forth looking up what the parameters for some method is
- A little bit of organization couldn't hurt
- Mostly I'm pretty happy with how this layer is organized right now
- Push to Github
- Push to Dockerhub from
rivers
docker build --platform linux/amd64 -t amacleanjs/sunday-service .
docker push amacleanjs/sunday-serviceMake sure the Dockerfile has the correct command to run the service in production
docker run -dp 80:5000 amacleanjs/sunday-serviceif the repo exists locally
docker run --name rivers -p 80:5000 -v /Users/andrewmaclean/BackyardFriends/rivers/:/home/app riversotherwise need to set up another container with mysql first. If you do this all data will be removed. Make sure this is what you want.
docker run -dp 80:5000 amacleanjs/sunday-service