mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
feature(server) add express
This commit is contained in:
parent
bb7156df5e
commit
7b92cb55aa
2 changed files with 11 additions and 3 deletions
|
|
@ -27,8 +27,9 @@
|
|||
http = main.http,
|
||||
https = main.https,
|
||||
Util = main.util,
|
||||
express = main.require('express'),
|
||||
|
||||
Server, Rest, Route, Minimize;
|
||||
app, Server, Rest, Route, Minimize;
|
||||
|
||||
/* базовая инициализация */
|
||||
function init(pAppCachProcessing) {
|
||||
|
|
@ -93,7 +94,13 @@
|
|||
},
|
||||
|
||||
lHTTPServer = function() {
|
||||
Server = http.createServer( controller );
|
||||
if (express) {
|
||||
app = express(),
|
||||
app.all('*', controller);
|
||||
Server = http.createServer(app);
|
||||
} else
|
||||
Server = http.createServer(controller);
|
||||
|
||||
Server.on('error', Util.log);
|
||||
Server.listen(lPort, lIP);
|
||||
lServerLog(lHTTP, lPort);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
"dependencies": {
|
||||
"dropbox": "0.10.2",
|
||||
"minify": "0.2.2",
|
||||
"socket.io": "0.9.16"
|
||||
"socket.io": "0.9.16",
|
||||
"express": "3.4.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"license": "MIT",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue