default ports for deviceServers
This commit is contained in:
Родитель
cc78462123
Коммит
03b2b3421a
|
@ -7,6 +7,8 @@ var gpio = require("pi-gpio");
|
|||
|
||||
var argv = process.argv;
|
||||
var port = argv[2];
|
||||
if (port == undefined)
|
||||
port = 8888;
|
||||
var pin = argv[3];
|
||||
if (pin == undefined)
|
||||
pin = 12;
|
||||
|
|
|
@ -9,6 +9,8 @@ var request = require("superagent");
|
|||
var argv = process.argv;
|
||||
var app = express();
|
||||
var port = argv[2];
|
||||
if (port == undefined)
|
||||
port = 9999;
|
||||
|
||||
//handle post/put
|
||||
app.use(function (req, res, next) {
|
||||
|
|
|
@ -7,6 +7,8 @@ var gpio = require("pi-gpio");
|
|||
|
||||
var argv = process.argv;
|
||||
var port = argv[2];
|
||||
if (port == undefined)
|
||||
port = 1234;
|
||||
var pin = argv[3];
|
||||
if (pin == undefined)
|
||||
pin = 11;
|
||||
|
|
|
@ -6,7 +6,6 @@ var cors = require('cors');
|
|||
|
||||
var argv = process.argv;
|
||||
var port = argv[2];
|
||||
|
||||
if (port === undefined)
|
||||
port = 4444;
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ var request = require("superagent");
|
|||
|
||||
var argv = process.argv;
|
||||
var port = argv[2];
|
||||
if (port == undefined)
|
||||
port = 1111;
|
||||
var pin = argv[3];
|
||||
if (pin == undefined)
|
||||
pin = 11;
|
||||
|
|
|
@ -7,7 +7,8 @@ var request = require("superagent");
|
|||
var argv = process.argv;
|
||||
var app = express();
|
||||
var port = argv[2];
|
||||
|
||||
if (port == undefined)
|
||||
port = 3333;
|
||||
//handle put
|
||||
app.use(function (req, res, next) {
|
||||
getRawBody(req, {
|
||||
|
|
Загрузка…
Ссылка в новой задаче