Questions tagged as 'nodejs'

1
answer

Infinite Loop with promise

I have serious doubts about this that came to me recently. I want to make an infinite loop of a request to an API every 15 seconds, but I want the loop to wait for the answer of the promise and then go again 15 seconds. So, the behavior I...
asked by 09.04.2018 / 17:21
2
answers

Show Node.js buffer in real time in a browser

I'm trying to make a program in Node.js that, after receiving a Unix-like command via POST , it executes it and displays in real time the output in the browser. This is the code I'm using to execute the commands: exec(myCommand, fu...
asked by 23.12.2015 / 20:05
1
answer

Secondary routes (nested routers) in Express

First, a little background and context : I am developing an application with nodejs + express . I am new to this technology, and the application will be of some complexity. So I'm doing it for modules , each on a specific...
asked by 17.04.2017 / 17:00
2
answers

Get localStorage of client in node js

What happens is that I'm doing an application with Node js, Angular and jQuery, and with sockets, what I need is to know if the user left the application, I issued a socket which removes me from the list of connected users, the user who left, I...
asked by 29.09.2016 / 06:11
1
answer

How to solve this jade error?

I'm just getting started on nodeJS and I'm using JADE as view engine , I'm just doing tests, nothing extraordinary, and yet throws the following error: C:\Users\Familia\Documents\node\expres\node_modules\promise\index.js:1 (function (exports,...
asked by 01.04.2018 / 23:25
2
answers

Access a property of a JSON

I have the following JSON "values": [ ["Martes", "pan", [8, [4],[0]], 7.381498329613434] ] } What would be the way to show the value: 7.381498329613434 in my Javascript console? Thank you very much     
asked by 07.11.2018 / 23:00
1
answer

Is it possible to change the name of a property in a Json or Json array?

I need to change the name to a Json property from an array [ { nombre : 'Luis', apellido : 'Gonzales' }, { nombre : 'Maria', apellido : 'Perez' }, { nombre : 'Ignacia', apellido : 'Valdebenito' } ] and I need to modify it in the follo...
asked by 04.03.2016 / 02:53
2
answers

Run background script

I'm doing a process with nodejs and I need to run say at every hour without needing to continually do something like node app.js . The script could have for example a console.log('ejecutar a cada hora') . Now, I was thinking a...
asked by 15.01.2016 / 21:23
2
answers

synchronous programming in nodejs, problems with asynchrony

I call from app.js like this: bd.permitir(req.body.nom,req.body.pass,resultado,bd.insertarLetra); my functions with callback are these: var permitir=function (usuarioNombre,usuarioPass,array,callback){ var objBD = BD(); var boolea...
asked by 04.10.2016 / 21:23
2
answers

Problem filling object with node and mongodb

I have the following function function getParadas(req,res){ var find; let paradas ={ paradasMetro:[], paradasCercanias:[], paradasBus:[] } var find1= ParadasMetro.find().sort('nombre_parada'); var find2= ParadasCercanias...
asked by 10.08.2017 / 20:44