项目作者: holidayextras

项目描述 :
A hapi style plugin to interface Tapestry
高级语言: JavaScript
项目地址: git://github.com/holidayextras/plugin-tapestry.git
创建时间: 2015-03-06T15:38:11Z
项目社区:https://github.com/holidayextras/plugin-tapestry

开源协议:MIT License

下载


plugin-tapestry

About

A hapi style plugin to interface Tapestry.

Getting Started

You can start with cloneing down the repo

  1. git clone git@github.com:holidayextras/plugin-tapestry.git

or to install this plugin to your Hapi server you will need to add this line to your dependencies in your package.json

  1. plugin-tapestry: 'git+ssh://git@github.com/holidayextras/plugin-tapestry.git'

After you will need to install this dependency and its dependencies

  1. $ npm install

Implementation

This plugin conforms to the hapijs plugin interface.

While bootstrapping your Hapi server, include the plugin like so:

  1. server.pack.register( [
  2. require( 'plugin-tapestry' )
  3. ], function() {
  4. server.start( function() {
  5. console.log( 'server started with plugin-tapestry plugin initialised' );
  6. } );
  7. } );

Inside your controllers you should then be able to do something like this:

  1. var tapestryRequestDeferred = Q.defer();
  2. request.server.plugins['plugin-tapestry'].makeItSo( tapestryRequestDeferred, options );

Contributing

Code is linted checked against the style guide with make-up, running npm test will run all tests required.

License

Copyright (c) 2016 Shortbreaks
Licensed under the MIT license.