json dinamico
This commit is contained in:
parent
e1953d1f3e
commit
498d806f69
|
@ -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);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"restApiRoot": "/api",
|
||||
"host": "0.0.0.0",
|
||||
"port": 3000,
|
||||
"port": 3001,
|
||||
"remoting": {
|
||||
"context": false,
|
||||
"rest": {
|
||||
|
|
|
@ -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 ]
|
Loading…
Reference in New Issue