Skip to content

A little service which replies when you go to /ping.

Notifications You must be signed in to change notification settings

nickcharlton/pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pong

A little service which replies when you go to /ping, with pong (and a few more helpful things).

The main purpose of this project is to have a simple, stateless application for testing. It's published as a basic Docker image.

Usage

$ go run main.go
pong
Listening on 8090...
$ curl localhost:8090/ping
pong

In addition:

  • /I am pong,
  • /params → any query params you provide,
  • /headers → any headers provided to the request

Docker

Building

You can build and tag the image like so:

docker build --tag pong .

Then tag the image with a new version:

docker image tag pong:latest pong:v1.0
$ docker image ls
REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
pong         latest    0abf2f9e56fc   5 minutes ago   892MB
pong         v1.0      0abf2f9e56fc   5 minutes ago   892MB

You can run it locally with:

$ docker run --publish 8090:8090 pong
pong
Listening on 8090...

Publishing

docker tag pong nickcharlton/pong:v1
docker push nickcharlton/pong:v1

About

A little service which replies when you go to /ping.

Resources

Stars

Watchers

Forks

Packages

No packages published