Node Hapi Skeleton is a Node.js server running with the Hapi framework.
- Utilizes a Swagger interface to easily test all HTTP endpoints. Swagger self-documents your HTTP endpoints to make it easy for your frontend developers to access data. Localhost Swagger
- Structured to easily support versioning of endpoints
- Implements a GraphQL endpoint to fetch/search your records/collections Localhost Graphql
- Utilizes Joi Validation to easily test that the users' payloads are what you expect them to be.
The framework is setup to run three processes: web, crons, and workers.
- Web
- Will boot up the Hapi server and Swagger interface
- Crons
- These are processes that run in the background at set intervals
- Workers
- Workers are background processes that may take quite a bit of time to complete, so they are enqueued to a RabbitMQ server via Heretic, a simple RabbitMQ interface
- Supports sending all server logs to Logentries if a LOGENTRIES_TOKEN is present.
- Supports sending uncaught/unhandled errors to Rollbar if a ROLLBAR_TOKEN is present.
- Utilizes Mariner to easily create database migrations using raw SQL statements instead of from a module.
- Utilizes Knex to handle your more robust queries
- Pre-built
Hapi Pre
functions to handle the bulk of your standard REST database queries automatically.- Fetch
- Search
- Upsert
- Delete
npm install
cp dev.env .env
- Get .env vars from another developer
docker-compose up -d
make web
- Docker for Postgres and RabbitMQ