Skip to content

Seneca plugin that adds a promise-based API for the core methods.

License

Notifications You must be signed in to change notification settings

voxgig/seneca-promisify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seneca-promisify

Seneca plugin providing a Promise-based API.

This is an interim plugin to provide a Promise-based API to Seneca.

NOTE: no longer provides a Promises API for entities, as seneca-entity 18.x+ provides this directly.

Npm Travis Coveralls

Voxgig This open source module is sponsored and supported by Voxgig.

Quick Example

const Seneca = require('seneca')

var seneca = Seneca()

// Callback version: seneca.add(msg, action)
// Define a message patter and action
seneca.message('a:1', async function(msg) {
  return {foo:1} // reply by just returning
})

// Callback version: seneca.act(msg, callback)
// Send a synchronous message action and wait for a reply
var reply = await seneca.post('a:1')



About

Seneca plugin that adds a promise-based API for the core methods.

Resources

License

Stars

Watchers

Forks

Packages

No packages published