https://github.com/cloudfoundry-samples/lattice-app
A Demo Application for Lattice
https://github.com/cloudfoundry-samples/lattice-app
Last synced: 3 months ago
JSON representation
A Demo Application for Lattice
- Host: GitHub
- URL: https://github.com/cloudfoundry-samples/lattice-app
- Owner: cloudfoundry-samples
- License: apache-2.0
- Created: 2014-12-02T17:33:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-05-09T18:36:36.000Z (almost 10 years ago)
- Last Synced: 2026-01-14T00:58:08.484Z (3 months ago)
- Language: Go
- Size: 78.1 KB
- Stars: 6
- Watchers: 29
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lattice-App - a simple Go webapp
> Lattice has been deprecated. Please use the [new test-app](https://github.com/cloudfoundry-samples/test-app).
### Pushing the app to Cloud Foundry
```
cf push lattice-app
```
### Endpoints
`/`: a simple landing page displaying the index and uptime
`/env`: displays environment variables
`/exit`: instructs Lattice to exit with status code 1
`/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 lattice-app -c "lattice-app --ports=7777,8888"
```
### Pushing the app to Lattice as a Docker image
Lattice-App is packaged as a docker image at cloudfoundry/lattice-app
To push to [Lattice](https://github.com/cloudfoundry-incubator/lattice) using [ltc](https://github.com/cloudfoundry-incubator/lattice/ltc):
```bash
ltc create lattice-app cloudfoundry/lattice-app
```
### To rebuild the dockerimage:
```bash
./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.