Skip to main content

Introduction

timeserver is a production-ready Node.js/TypeScript REST API that returns the current time in 5 timezones: Toronto, London, Mumbai, Tokyo, and Sydney.

It was built as a reference project covering everything from a basic Express API to a fully hardened, observable, and automatically deployed service.

What's inside

AreaWhat was built
APIREST endpoints with rate limiting, input validation, and OpenAPI docs
ObservabilityStructured JSON logging, Prometheus metrics, distributed tracing, Grafana dashboard
SecurityHelmet headers, Zod validation, Trivy image scanning, Kubernetes Secrets
CI/CD7-job GitHub Actions pipeline on a self-hosted runner with automatic minikube deployment
KubernetesHelm chart with ConfigMap, HPA, PDB, NetworkPolicy, ResourceQuota
Developer ExperienceESLint, pre-commit hooks, OpenAPI docs, Docusaurus documentation

Quick start

git clone https://github.com/sp724/timeserver.git
cd timeserver
nvm use
npm install
npm run dev

Then hit the API:

curl http://localhost:8888/api/v1/time

Source code

github.com/sp724/timeserver