poe-assets-proxy

0.1.0 • Public • Published

poe-assets-proxy

Share assets across applications

Installation

$ npm install --save poe-assets-proxy

Usage

// app.js
var proxy = require(poe-assets-proxy');
var db = require('./db');
 
var app = module.exports = proxy(db, {
  secret: 'MY_SHARED_SECRET' // this secret should be shared across app servers and be sent every time there is a manifest update
});
// db.js
exports.replace = function(name, manifest, cb) {
  // will be called anytime there is a new manifest
};
 
exports.lookup = function(path, cb) {
  // will be called anytime there is a request for an asset.
  // this function should cb() an array of endpoints that host
  // the particular asset
}

Tests

$ npm test

Readme

Keywords

Package Sidebar

Install

npm i poe-assets-proxy

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • camshaft
  • mndvns