Skip to content

poegroup/poe-assets-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Share assets across applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published