mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
23 lines
831 B
JavaScript
23 lines
831 B
JavaScript
(function() {
|
|
'use strict';
|
|
|
|
if (!global.cloudcmd)
|
|
return console.log(
|
|
'# express.js' + '\n' +
|
|
'# -----------' + '\n' +
|
|
'# Module is part of Cloud Commander,' + '\n' +
|
|
'# easy to use web server.' + '\n' +
|
|
'# http://cloudcmd.io' + '\n');
|
|
|
|
var main = global.cloudcmd.main,
|
|
express = main.require('express'),
|
|
app = express && express();
|
|
|
|
exports.getApp = function(controller) {
|
|
if (app)
|
|
app.use(express.logger('dev'))
|
|
.all('*', controller);
|
|
|
|
return app;
|
|
};
|
|
})();
|