GitHub - mapitman/beats-service: Web service which provides the current "Internet Time"

Web service which provides the current Internet Time in beats.
Welcome to 1998!

Running with Docker

Pull and run the pre-built image directly from Docker Hub — no local Go installation needed:

docker run --rm -p 8080:8080 mapitman/beats-service:latest

The service will be available at http://localhost:8080/beats.

Running Locally

Build and run the service directly with Go:

make build
./beats-service

The service listens on port 8080 by default.

Calling the Web Service

The service supports content negotiation via the Accept request header. Pass Accept: application/json to receive a JSON response, or omit it (or pass Accept: text/html) to receive an HTML page.

HTML response

curl http://localhost:8080/beats

JSON response

curl -H "Accept: application/json" http://localhost:8080/beats

Example JSON response: