Skip to content

simonkrenger/random-webservice

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Web service to return a random number

Go-based web service that returns a random number when queried on port 8080. Comes with a Dockerfile to build and run the service.

# Build
docker build .

# Run locally
docker run -d -p 8080:8080 quay.io/simonkrenger/random-webservice:latest

# Run and expose on OpenShift
oc run random-webservice --image=quay.io/simonkrenger/random-webservice:latest
oc expose dc random-webservice --port 8080
oc create route edge random-webservice --service=random-webservice --port=8080

# Query
curl localhost:8080/random
{"number":"81"}

About

Minimalistic web service to retrieve random numbers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published