manage your tasks
# Optional(port)
# port is defined by either environment variable or argument
export PORT=8000
# Run with specified port
go run main.go --port ${port}
# port is randomly assigned, if not specified
# except the case environment value - PORT is set
go run main.go
# health check returns json: {"messsage":"OK"}
curl <endpoint url>/health
- go 1.12+
- mkdir %GOPATH%/src/github.com/mura123yasu
- cd %GOPATH%/src/github.com/mura123yasu
- git clone
- cd
- go mod download
coming soon...
coming soon...
for Binary
# Build binary
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-s -w' -a -installsuffix cgo -o ./bin/main ./main.go
# Run with specified port
./bin/main --port ${port}
for Docker
# Build
docker build -t slack-timeline .
# Run server
docker run --name slack-timeline-container -d -e "PORT=8000" -p 8000:8000 -t slack-timeline