This assignment consists of two microservice projects: device-service and message-gateway-service. These two projects are independent web services.
cp docker-vars.example.env docker-vars.env
docker compose up -dcp .example.env .envLoad environment variables using your preferred method. For example, you can use VSCode's launch.json to configure and load environment variables.
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Device Service",
"type": "go",
"request": "launch",
"mode": "auto",
"envFile": "${workspaceFolder}/.env",
"program": "${workspaceFolder}/cmd/device-service"
},
{
"name": "Launch Message Gateway Service",
"type": "go",
"request": "launch",
"mode": "auto",
"envFile": "${workspaceFolder}/.env",
"program": "${workspaceFolder}/cmd/message-gateway-service"
}
]
}Run:
go run cmd/device-service/main.goUpdate Wire:
wire cmd/device-service/Run:
go run cmd/message-gateway-service/main.goUpdate Wire:
wire cmd/message-gateway-service/- build: Changes that affect the build system or external dependencies
- chore: Updating tasks etc; no production code change
- ci: Changes to our CI configuration files and scripts
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
- sample: A change to the samples