Comparing version 0.1.3 to 0.1.4
'use strict'; | ||
var path = require('path'); | ||
var express = require('express'); | ||
@@ -16,7 +15,7 @@ var conf = require('../conf'); | ||
server.listen(conf.port, '127.0.0.1', function () { | ||
console.log('Server listening on port', conf.port); | ||
console.log('Server listening on port ' + conf.port); | ||
}); | ||
// Add ./public | ||
app.use(express['static'](path.join(__dirname, 'public'))); | ||
app.use(express['static']('' + __dirname + '/public')); | ||
app.use(router); | ||
@@ -23,0 +22,0 @@ |
@@ -8,6 +8,6 @@ 'use strict'; | ||
$('body').on('click', '.stop', function () { | ||
var id = $(this).data('id'); | ||
var id = $(undefined).data('id'); | ||
socket.emit('stop', id); | ||
}).on('click', '.start', function () { | ||
var id = $(this).data('id'); | ||
var id = $(undefined).data('id'); | ||
socket.emit('start', id); | ||
@@ -14,0 +14,0 @@ }); |
@@ -17,2 +17,6 @@ 'use strict'; | ||
function version(req, res) { | ||
res.send(pkg.version); | ||
} | ||
function kill(req, res) { | ||
@@ -47,3 +51,3 @@ res.end(); | ||
var url = 'http://localhost:' + port; | ||
console.log('Redirect to', url); | ||
console.log('Redirect to ' + url); | ||
res.redirect(url); | ||
@@ -69,5 +73,5 @@ } | ||
router.get('/', index).get('/:id', redirect).post('/kill', kill); | ||
router.get('/', index).get('/version', version).get('/:id', redirect).post('/kill', kill); | ||
return router; | ||
}; |
@@ -90,3 +90,3 @@ /* | ||
group.on(monEvent, function () { | ||
group.emit('change'); | ||
return group.emit('change'); | ||
}); | ||
@@ -112,9 +112,9 @@ } | ||
monitor.on('created', function (file) { | ||
console.log('created', file); | ||
console.log('created ' + file); | ||
addServer(group, file); | ||
}).on('changed', function (file) { | ||
console.log('changed', file); | ||
console.log('changed ' + file); | ||
updateServer(group, file); | ||
}).on('removed', function (file) { | ||
console.log('removed', file); | ||
console.log('removed ' + file); | ||
removeServer(group, file); | ||
@@ -121,0 +121,0 @@ }); |
{ | ||
"name": "hotel", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Easily start, stop and access your servers from the browser", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
{ | ||
"optOut": false, | ||
"lastUpdateCheck": 1432918924953 | ||
"lastUpdateCheck": 1432989369623 | ||
} |
@@ -1,1 +0,1 @@ | ||
{"cmd":"node index.js","cwd":"/home/sonic/d/hotel/test/app","out":"output.log","env":{"PATH":"/home/sonic/.nvm/versions/node/v0.12.4/lib/node_modules/npm/bin/node-gyp-bin:/home/sonic/d/hotel/node_modules/.bin:/home/sonic/.nvm/versions/node/v0.12.4/lib/node_modules/npm/bin/node-gyp-bin:/home/sonic/d/hotel/node_modules/.bin:/home/sonic/.nvm/versions/node/v0.12.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"}} | ||
{"cmd":"node index.js","cwd":"/Users/sonic/d/hotel/test/app","out":"output.log","env":{"PATH":"/Users/sonic/.nvm/versions/node/v0.12.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/sonic/d/hotel/node_modules/.bin:/Users/sonic/.nvm/versions/node/v0.12.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/sonic/d/hotel/node_modules/.bin:/Users/sonic/.rbenv/shims:/Users/sonic/.rbenv/bin:/Users/sonic/.nvm/versions/node/v0.12.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sonic/go/bin"}} |
@@ -13,5 +13,7 @@ process.env.HOME = `${__dirname}/home` | ||
let timeout = process.env.TRAVIS ? 8000 : 4000 | ||
// Used to give some time to the system and commands | ||
function wait (done) { | ||
setTimeout(done, 4000) | ||
setTimeout(done, timeout) | ||
} | ||
@@ -29,3 +31,3 @@ | ||
this.timeout(4500) | ||
this.timeout(timeout + 1000) | ||
@@ -32,0 +34,0 @@ before((done) => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82838
18