Port je posilan pres argv
This commit is contained in:
+1
-7
@@ -125,7 +125,6 @@ function renderTemplate(req, res) {
|
||||
var viewsRoot = app.get ('views');
|
||||
|
||||
for (var budget in templateData.budget) {
|
||||
console.log(typeof templateData.budget[budget]);
|
||||
|
||||
if (typeof templateData.budget[budget] == 'undefined') {
|
||||
templateData.budget.splice (budget, 1);
|
||||
@@ -171,7 +170,6 @@ app.get ('/:page?', function (req, res) {
|
||||
});
|
||||
|
||||
function savePost(req, res) {
|
||||
console.log (req.body);
|
||||
|
||||
for (var i in req.body) {
|
||||
templateData[i] = req.body[i];
|
||||
@@ -230,7 +228,6 @@ app.post ('/budget/groups', function (req, res) {
|
||||
});
|
||||
|
||||
app.post ('/budget/add_item', function (req, res) {
|
||||
console.log (req.body);
|
||||
var items = req.body.name.length;
|
||||
|
||||
var newGroupsMap = {};
|
||||
@@ -273,7 +270,6 @@ app.post ('/budget/add_item', function (req, res) {
|
||||
});
|
||||
|
||||
app.post ('/budget/add_item_in_group', function (req, res) {
|
||||
console.log (req.body);
|
||||
var items = req.body.name.length;
|
||||
|
||||
var group = req.body.group;
|
||||
@@ -324,8 +320,6 @@ app.post ('/budget/bought/:group/:item', function (req, res) {
|
||||
|
||||
templateData.budget[group].items[item].bought = (req.body.bought == 'true' ? true : false);
|
||||
|
||||
console.log (templateData.budget[group]);
|
||||
|
||||
res.end ();
|
||||
|
||||
});
|
||||
@@ -362,4 +356,4 @@ app.post ('/editor/:page?', function (req, res) {
|
||||
res.redirect (redirectUrl)
|
||||
});
|
||||
|
||||
app.listen (8080);
|
||||
app.listen (process.argv[2]);
|
||||
Reference in New Issue
Block a user