Giter Club home page Giter Club logo

hapi-confi's Introduction

hapi-confi Build Status Coverage Status

Set up and run a hapi server using yaml/json files from a config directory

Installation

npm install hapi-confi

Usage

var Hapi = require('hapi');
var hapiConfi = require('hapi-confi');
hapiConfi(Hapi, options, function(err, server, config) {
   /* server is a configured hapi server here */
   server.start(function(){
   });
}

Options

  • configPath - relative to 'cwd', defaults to 'conf/'
  • server - standard hapi server configuration options, see hapi docs for available options.

Major Config items:

  • before - list of event handlers to fire on a 'before' event
  • logging - list of reporters to use from 'good.js', the hapi logging library
    • reporters - any 'good-' reporters to use for logging (e.g. good-console)
  • authPlugins - list of auth plugins
  • strategies - list of strategies of the form:
    • provider
      • scheme
      • mode
      • options
      • profile -
  • plugins - list of hapi plugins that will be added to your server through hapi.register()
    • options - options to pass when the plugin is registered
  • views - list of view engines to register with hapi.views()
  • engines - list of modules to import and pass to view
  • validator - optional validator library for hapi v19+ (usually '@hapi/joi')

hapi-confi's People

Contributors

dannyvink avatar dawnerd avatar ecwillis avatar jgallen23 avatar orthagonal avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hapi-confi's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.