This is an example of a basic HTTP API server.
Includes:
-
standard
for code style -
productionize
for log formatting -
healthpoint
for health checks -
tape
for testing -
servertest
for endpoint testing -
nodemon
for auto-restart in development -
nyc
for code coverage -
dependency-check
to ensure no missing or extra dependencies -
http-hash-router
for routing -
send-data
for JSON response -
req-logger
for request logging -
dotenv
,.env.example
, andconfig.js
for env vars - example
db.js
andmodel.js
-
body
for JSON POST body parsing -
pump
for stream piping - endpoint/route callback argument for error handling (with request id)
-
corsify
for CORS -
authentic-service
andauthify.js
for authentication