0.1.2 • Published 3 years ago

@voom/wire v0.1.2

Weekly downloads
27
License
MIT
Repository
github
Last release
3 years ago

@voom/wire

Absolute paths for Hapi.

This plugin allows you to import modules using absolute paths.

Installation

npm install @voom/wire

Usage

const Hapi = require('@hapi/hapi')
const Wire = require('@voom/wire')

const Config = Wire.config('server')  // :root:/config/server.js
const Logger = Wire.plugins('logger') // :root:/plugins/logger.js

async function start () {
  const server = Hapi.Server(Config)

  await server.register(Logger)

  await server.start()
}

start()