xero-express

0.0.1 • Public • Published

Express middleware for Xero

Install

npm install xero-express

Use

Note: Only a few entities are supported at the moment.

var xero = require('xero-express');
 
server.use('/xero', xero({
  key: 'XERO_KEY',
  secret: 'XERO_SECRET',
  rsa: 'XERO_RSA'
}));

The config object passed to xero() has an optional responder property that lets you override the default responder. For example:

server.use('xero/*', xero({
  key: 'XERO_KEY',
  secret: 'XERO_SECRET',
  rsa: 'XERO_RSA',
  responder: function (err, json, res) {
    console.log(json);
    res.json(404, {});
  }
}));

Readme

Keywords

Package Sidebar

Install

npm i xero-express

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • nathanhoad