/slack-timeline

manage your tasks

Primary LanguageGo

slack-timeline

manage your tasks

Configurations

# Optional(port)
# port is defined by either environment variable or argument
export PORT=8000

Getting started

# 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

For developer

Required

  • go 1.12+

Setup

  1. mkdir %GOPATH%/src/github.com/mura123yasu
  2. cd %GOPATH%/src/github.com/mura123yasu
  3. git clone
  4. cd
  5. go mod download

Unit Test

coming soon...

Directory layout

coming soon...

Build & Run

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

Deploy to Cloud Run

from master branch

Run on Google Cloud

from staging branch

Run on Google Cloud