# hapi-confi

> Set up hapi from a config file

Latest version **10.0.1** (published 2021-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install hapi-confi
pnpm add hapi-confi
yarn add hapi-confi
bun add hapi-confi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 10.0.1 |
| Published | 2021-02-19 |
| First published | 2015-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 28.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Greg Allen |
| Maintainers | jga, dawnerd, ecwillis, orthagonal1, alaguna, aleperez92 |
| Keywords | hapi, config, confi |

## Links

- npm: https://www.npmjs.com/package/hapi-confi
- Repository: https://github.com/firstandthird/hapi-confi
- Homepage: https://github.com/firstandthird/hapi-confi#readme
- Issues: https://github.com/firstandthird/hapi-confi/issues
- npm.io page: https://npm.io/package/hapi-confi

## Dependencies (4)

- [aug](https://npm.io/package/aug.md) ^3.0.1
- [confi](https://npm.io/package/confi.md) ^9.9.0
- [deptree](https://npm.io/package/deptree.md) ^1.0.0
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 10.0.1 (latest) — 2021-02-19
- 10.0.0 — 2020-03-24
- 9.0.0 — 2019-10-01
- 8.2.0 — 2019-09-17
- 8.1.0 — 2019-05-08
- 8.0.0 — 2019-04-02
- 7.5.0 — 2018-09-12
- 7.4.1 — 2018-03-24
- 7.4.0 — 2018-03-03
- 7.3.1 — 2018-02-07
- 7.3.0 — 2018-01-30
- 7.2.0 — 2018-01-30
- 7.1.1 — 2018-01-24
- 7.1.0 — 2018-01-15
- 7.0.0 — 2018-01-10
- … 31 more at https://npm.io/package/hapi-confi/versions

## README

## hapi-confi  [![Build Status](https://travis-ci.org/firstandthird/hapi-confi.svg?branch=master)](https://travis-ci.org/firstandthird/hapi-confi) [![Coverage Status](https://coveralls.io/repos/github/firstandthird/hapi-confi/badge.svg?branch=master)](https://coveralls.io/github/firstandthird/hapi-confi?branch=master)


  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')

---
_Source: https://npm.io/package/hapi-confi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
