This is an example of a basic HTTP API server.
Includes:
-
standardfor code style -
productionizefor log formatting -
healthpointfor health checks -
tapefor testing -
servertestfor endpoint testing -
nodemonfor auto-restart in development -
nycfor code coverage -
dependency-checkto ensure no missing or extra dependencies -
http-hash-routerfor routing -
send-datafor JSON response -
req-loggerfor request logging -
dotenv,.env.example, andconfig.jsfor env vars - example
db.jsandmodel.js -
bodyfor JSON POST body parsing -
pumpfor stream piping - endpoint/route callback argument for error handling (with request id)
-
corsifyfor CORS -
authentic-serviceandauthify.jsfor authentication