sample-app

command module
v0.0.0-...-3590cfd Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Sample App - a simple Go webapp

Pushing the app to Gstack
gk push sample-app
Endpoints
  • /: a simple landing page displaying the index and uptime
  • /env: displays environment variables
  • /exit: instructs the app to exit with status code 1
  • /index: returns the application index
  • /headers: dump request headers
  • /port: returns the local port the request was received on
Configure the app to listen on multiple ports

By providing a customer start command, you can configure the app to listen on multiple ports. The app responds the same way to each port.

cf push sample-app -c "sample-app --ports=7777,8888"
Pushing the app to Gstack as a Docker image

Sample App is also packaged as a docker image at gstackio/sample-app

cf push wow-cool -o gstackio/sample-app -d <my-family-name>.gstack.me

→ Where <my-family-name> is to be replaced by your own family name.

To rebuild the dockerimage:
./build.sh

Assumes you have the go toolchain (with the ability to cross-compile to different platforms) and docker installed and pointing at your docker daemon.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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