mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 01:48:51 +00:00
[API Refactor] Uncomment out erroneous change
This commit is contained in:
parent
2665e55e59
commit
ed454df97d
40
app.js
40
app.js
@ -40,26 +40,26 @@
|
||||
}
|
||||
|
||||
// Override bundles.json for HTTP requests
|
||||
//app.use('/' + BUNDLE_FILE, function (req, res) {
|
||||
// var bundles;
|
||||
//
|
||||
// try {
|
||||
// bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
|
||||
// } catch (e) {
|
||||
// bundles = [];
|
||||
// }
|
||||
//
|
||||
// // Handle command line inclusions/exclusions
|
||||
// bundles = bundles.concat(options.include);
|
||||
// bundles = bundles.filter(function (bundle) {
|
||||
// return options.exclude.indexOf(bundle) === -1;
|
||||
// });
|
||||
// bundles = bundles.filter(function (bundle, index) { // Uniquify
|
||||
// return bundles.indexOf(bundle) === index;
|
||||
// });
|
||||
//
|
||||
// res.send(JSON.stringify(bundles));
|
||||
//});
|
||||
app.use('/' + BUNDLE_FILE, function (req, res) {
|
||||
var bundles;
|
||||
|
||||
try {
|
||||
bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
|
||||
} catch (e) {
|
||||
bundles = [];
|
||||
}
|
||||
|
||||
// Handle command line inclusions/exclusions
|
||||
bundles = bundles.concat(options.include);
|
||||
bundles = bundles.filter(function (bundle) {
|
||||
return options.exclude.indexOf(bundle) === -1;
|
||||
});
|
||||
bundles = bundles.filter(function (bundle, index) { // Uniquify
|
||||
return bundles.indexOf(bundle) === index;
|
||||
});
|
||||
|
||||
res.send(JSON.stringify(bundles));
|
||||
});
|
||||
|
||||
// Expose everything else as static files
|
||||
app.use(express['static']('.'));
|
||||
|
Loading…
Reference in New Issue
Block a user