Skip to content

dolittle-entropy/go-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published