Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 835 Bytes

README.md

File metadata and controls

64 lines (47 loc) · 835 Bytes

Start server

Without Prefix

PORT=1234 go run main.go

With Prefix

URL_PREFIX="/yo" PORT=1234 go run main.go

Query

Without Prefix

PORT=1234 curl "localhost:1234/"
PORT=1234 curl "localhost:1234/hi"
PORT=1234 curl "localhost:1234/hello-world"

With Prefix

PORT=1234 curl "localhost:1234/yo"
PORT=1234 curl "localhost:1234/yo/"
PORT=1234 curl "localhost:1234/yo/hi"
PORT=1234 curl "localhost:1234/yo/hello-world"

Docker

Build

docker build -f ./Dockerfile -t hello-world .

docker tag hello-world dolittle/hello-world:latest
docker push dolittle/hello-world:latest

Environment Variables

BIND

  • localhost or 0.0.0.0

PORT

  • port to listen to

URL_PREFIX

  • the prefix used, to "work on a sub route"