poe-assets-proxy
Share assets across applications
Last updated 6 years ago by camshaft .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install poe-assets-proxy 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.0                                ...           latest (6 years ago)

1 Versions

  • 0.1.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |