How to use the port function from optimist
Find comprehensive JavaScript optimist.port code examples handpicked from public code repositorys.
GitHub: hjespers/teslams
40 41 42 43 44 45 46 47 48 49
} var http = require('http'); // set and check the validity of the HTTP listen port // the environment variable $PORT is read for deployment on heroku var httpport = process.env.PORT || argv.port; if (isNaN(httpport) || httpport < 1) { console.log("missing or incorrect http listen port: '" + httpport + "' using default 8888\n"); httpport = 8888; }
112
418
58
optimist.argv is the most popular function in optimist (138 examples)