marsicdev / hapi-rest-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hapi Rest API | Hapi based REST application boilerplate

Overview

Project provides a starting point for building a RESTful API in nodejs using hapijs framework. Project is influenced by hapi-starter-kit with some modifications.

Follows industry standard best practices, and uses latest ES (6/7/8) features.

  • Bring your own front-end.
  • Plug-in your own Database.

Libs used

Uses yarn over npm

dependencies

dev-dependencies

Getting Started

Install dependencies

$ yarn

Start Server Set environment variables defined in config/custom-environment-variables.json

$ yarn start

Try GET /ping to make sure server is up

$ curl http://localhost:3030/ping

Run Tests

$ yarn test

Environment Configuration

config is used to configure application.

For ex. if APP_PORT env var is set it can be accessed as config.get('app.port'). You can read more on custom environment variables here.

License

This project is licensed under the MIT License

About

License:MIT License


Languages

Language:JavaScript 100.0%