/example-server

Example HTTP API server

Primary LanguageJavaScript

Example Server

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, and config.js for env vars
  • example db.js and model.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 and authify.js for authentication