Skip to content

lorengreenfield/smThen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

smThen

Wrap hapi.js server methods with a Promise. Requires Node.js 5+. ( Uses spread operator )

Installation

npm install smthen --save

Usage

import smThen from 'smthen';

smThen(server.methods.myServerMethod, 'arg1', 'arg2' [, any number of arguments])
.then(result => {
    //do something with result
})
.catch(err => {
    console.log(err.toString());
})

About

Wrap hapi.js server method with a Promise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published