docker build -t emoji/udp-server:latest .
docker run -it --rm -p 54321:54321/udp --name emoji-udp-server emoji/udp-server:latest
IMPORTANT: cd
into src
folder and then run go
cmds
go build
go test ./...
Test verboselly:
go test -v ./...
Test specific area:
go test -v ./... -run Build
EMOJI_PORT=54321 ./emoji-udp-server
EMOJI_PORT=54321 ./emoji-udp-server -n 3 -s ','
You can use client e2e testing app located in src/client/client.go
to test the server manually.
Adjust the port value in the source file if needed - it should match the value set in environment variable.
go run client/client.go
Type you cmd and hit enter.
Example commands:
-
3 :ok:
-
:metrics:
Logs can be found in the file emoji.log
in the folder where binary is executed.
To copy logs from the Docker container, run:
docker cp CONTAINER_ID:/emoji.log ./