react-native/packager/react-packager/index.js

20 lines
454 B
JavaScript
Raw Normal View History

'use strict';
2015-01-30 01:10:49 +00:00
var Activity = require('./src/Activity');
var Server = require('./src/Server');
2015-01-30 01:10:49 +00:00
exports.middleware = function(options) {
var server = new Server(options);
return server.processRequest.bind(server);
2015-01-30 01:10:49 +00:00
};
exports.buildPackageFromUrl = function(options, reqUrl) {
Activity.disable();
var server = new Server(options);
return server.buildPackageFromUrl(reqUrl)
.then(function(p) {
server.kill();
return p;
});
2015-01-30 01:10:49 +00:00
};