pivotal-Josh-Gainey / goserviceexample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

goserviceexample

This is a simple hello world go app compiled with go v1.19 that can be pushed to cloud foundry as an application.

This application has 2 endpoints:
/ returns "Hello World!"
/get-random-number returns a random number

It is possible to instruct this app to listen on a custom port with an environment variable in the manifest. Specify TCPPORT env var with the port desired for app to listen on. In the provided example manifest, this env var is set to 8095.

1 - clone this repo:

https://github.com/pivotal-Josh-Gainey/goserviceexample.git

2 - cd into goserviceexample folder, make desired edits to manifest if applicable, and run cf push

This pushes the application with a process healthcheck.

About

License:MIT License


Languages

Language:Go 96.3%Language:Procfile 3.7%