go-hello-world

command module
v0.0.0-...-45c02ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 8 Imported by: 0

README

go-hello-world

I say hello for you.

go run ./main.go
curl http://localhost
Hello, World!

Usage

Customize message and port number
MESSAGE='Hey hey, Yo!' PORT_NUMBER=8080 SLEEP_MILLISEC=300 go run ./main.go
curl http://localhost:8080
Hey hey, Yo!
Use pre-built container image
docker run -p 8000:80 -e MESSAGE='Hello, Container World!' public.ecr.aws/toricls/go-hello-world:latest
Build and use your own container image
docker build -t go-hello-world:latest .

docker run -p 8000:80 -e MESSAGE='Hello, Container World!' go-hello-world:latest
Run on AWS Lambda

go-hello-world natively supports running on AWS Lambda. Try creating a new AWS Lambda function in your AWS account using your own container image. (Just pulling public.ecr.aws/toricls/go-hello-world:latest on your laptop and push it to your ECR private repository is the easiest way I think, because AWS Lambda doesn't support ECR Public today).

See the main function in main.go to know how you can implement in the same way in your go app.

Note that the PORT_NUMBER environment variable is not (obviously) supported when you run the app on AWS Lambda.

Contribution

  1. Fork (https://github.com/toricls/go-hello-world/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create a new Pull Request

Licence

MIT

Author

Tori

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL