From 498d806f69d6aa30a20cf327fadc7ed718c08532 Mon Sep 17 00:00:00 2001 From: Javi Gallego Date: Tue, 8 Nov 2016 09:27:41 +0100 Subject: [PATCH] json dinamico --- @salix-services/app/server/boot/routes.js | 6 ++---- @salix-services/app/server/config.json | 2 +- npm-debug.log | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 npm-debug.log diff --git a/@salix-services/app/server/boot/routes.js b/@salix-services/app/server/boot/routes.js index 770ca1cc8..cd7a0b136 100644 --- a/@salix-services/app/server/boot/routes.js +++ b/@salix-services/app/server/boot/routes.js @@ -6,8 +6,7 @@ module.exports = function(app) { res.render('index.ejs'); } else{ - res.status(401); - res.send("No autorizado"); + res.redirect('/login'); } }); //https://github.com/expressjs/cookie-parser @@ -28,8 +27,7 @@ module.exports = function(app) { if (req.cookies['salix-session']){ res.set('Content-Type', 'application/json'); //TODO: construir js dinamico de las rutas - res.status(404); - res.send(); + res.send('var rutas={}'); } else{ res.status(401); diff --git a/@salix-services/app/server/config.json b/@salix-services/app/server/config.json index 40d45f4d6..13c16153a 100644 --- a/@salix-services/app/server/config.json +++ b/@salix-services/app/server/config.json @@ -1,7 +1,7 @@ { "restApiRoot": "/api", "host": "0.0.0.0", - "port": 3000, + "port": 3001, "remoting": { "context": false, "rest": { diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 000000000..ecbd05da4 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,22 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'start' ] +2 info using npm@3.10.8 +3 info using node@v6.9.1 +4 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\jgallego\projects\salix\package.json' +4 verbose stack at Error (native) +5 verbose cwd C:\Users\jgallego\projects\salix +6 error Windows_NT 10.0.14393 +7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" +8 error node v6.9.1 +9 error npm v3.10.8 +10 error path C:\Users\jgallego\projects\salix\package.json +11 error code ENOENT +12 error errno -4058 +13 error syscall open +14 error enoent ENOENT: no such file or directory, open 'C:\Users\jgallego\projects\salix\package.json' +15 error enoent ENOENT: no such file or directory, open 'C:\Users\jgallego\projects\salix\package.json' +15 error enoent This is most likely not a problem with npm itself +15 error enoent and is related to npm not being able to find a file. +16 verbose exit [ -4058, true ]