lethaldose / hello-server

hello-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello server

A simple web server that responds to the resource path /hello/<name> with a web page that displays a greeting and timestamp.

Illustration

Build the image:

docker build -t hello-server .

Run the server as follows:

docker run -p 8080:80 --name my-hello-server hello-server

Test the health check endpoint:

curl localhost:8080/ping

This should return the response ok.

Test the /hello endpoint:

curl localhost:8080/hello/bob

This should return:

Hi there bob<br>
<i>1617809127162</i>

To cleanup:

docker kill my-hello-server
docker rm my-hello-server

About

hello-server

License:Other


Languages

Language:JavaScript 90.0%Language:Dockerfile 10.0%