mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
feature(server) add port number check
This commit is contained in:
parent
7c4d5da9d2
commit
9a78ce3fe5
1 changed files with 3 additions and 0 deletions
|
|
@ -40,6 +40,9 @@
|
|||
socket: io.listen(server)
|
||||
}));
|
||||
|
||||
if (port <= 0 || port > 65535)
|
||||
exit('cloudcmd --port: %s', 'port number could be 1..65535');
|
||||
|
||||
server.on('error', function(error) {
|
||||
exit('cloudcmd --port: %s', error.message);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue