mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(server) rm socket condition
This commit is contained in:
parent
a3cfadb84c
commit
2ac5a353aa
1 changed files with 3 additions and 13 deletions
|
|
@ -40,21 +40,11 @@
|
|||
app = middle;
|
||||
|
||||
server = http.createServer(app);
|
||||
socket = io.listen(server);
|
||||
|
||||
server.on('error', function(error) {
|
||||
console.log(error.message);
|
||||
});
|
||||
|
||||
middleware.listen(socket);
|
||||
server.listen(port, ip);
|
||||
|
||||
if (io) {
|
||||
socket = io.listen(server);
|
||||
middleware.listen(socket);
|
||||
}
|
||||
|
||||
if (!config('ip'))
|
||||
ip = 'localhost';
|
||||
|
||||
console.log('url: http://' + ip + ':' + port);
|
||||
console.log('url: http://%s:%d', config('ip') || 'localhost', port);
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue