mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-04-28 09:25:51 +08:00
Changed port number to 2403
This commit is contained in:
12
bin/dpd
12
bin/dpd
@@ -11,7 +11,7 @@ var program = require('commander')
|
||||
|
||||
program
|
||||
.version('0.3.0-pre')
|
||||
.option('-p, --port <port>', 'specify the port (2304)')
|
||||
.option('-p, --port <port>', 'specify the port (2403)')
|
||||
.option('-s, --storage <url>', 'specify where to store resources (mongodb://localhost/deployd)')
|
||||
;
|
||||
|
||||
@@ -23,7 +23,7 @@ program
|
||||
.command('keys')
|
||||
.description(' - list all admin keys')
|
||||
.action(function () {
|
||||
var port = program.port || 2304;
|
||||
var port = program.port || 2403;
|
||||
|
||||
if(program.storage) {
|
||||
dpd.storage(program.storage);
|
||||
@@ -55,7 +55,7 @@ program
|
||||
dpd.storage(program.storage);
|
||||
}
|
||||
|
||||
var port = program.port || 2304;
|
||||
var port = program.port || 2403;
|
||||
|
||||
dpd.use('http://localhost:' + port).use('/keys').post(key, function (err, newKey) {
|
||||
if(err) {
|
||||
@@ -88,7 +88,7 @@ program
|
||||
.command('key')
|
||||
.description(" - generate, add, and print a random admin key")
|
||||
.action(function () {
|
||||
var port = program.port || 2304;
|
||||
var port = program.port || 2403;
|
||||
var key = {}, strength = Math.floor(Math.random() * 5) + 2;
|
||||
|
||||
while(strength--) {
|
||||
@@ -120,7 +120,7 @@ program
|
||||
dpd.storage(program.storage);
|
||||
}
|
||||
|
||||
var port = program.port || 2304;
|
||||
var port = program.port || 2403;
|
||||
|
||||
dpd.use('http://localhost:' + port).use('/keys').del({_id: _id}, function (err) {
|
||||
if(err) console.log(err);
|
||||
@@ -138,7 +138,7 @@ program
|
||||
.description(' - start listening over http at the provided port')
|
||||
.action(function (cmd) {
|
||||
|
||||
var port = program.port || 2304;
|
||||
var port = program.port || 2403;
|
||||
|
||||
if(program.storage) {
|
||||
dpd.storage(program.storage);
|
||||
|
||||
@@ -19,10 +19,10 @@ var middleware = function (req, res, next) {
|
||||
|
||||
middleware.listen = function (callback) {
|
||||
var server = this.server = express.createServer(express.bodyParser(), express.cookieParser())
|
||||
, url = parse(this.url || 'http://localhost:2304');
|
||||
, url = parse(this.url || 'http://localhost:2403');
|
||||
|
||||
// port
|
||||
var port = url.port || 2304;
|
||||
var port = url.port || 2403;
|
||||
// host
|
||||
var hostname = url.hostname || 'localhost';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user