Questions tagged as 'nodejs'

0
answers

global variable scope within a promise

I have this snippet of code in node.js, similar to javascript, well what happens is that it uses asynchronous methods to perform a validation of fields that is entered through a csv file, therefore I must analyze value by value of the fix _da...
asked by 15.07.2018 / 00:46
0
answers

iterate over a connection to mysql and execute a query

I find the following problem .. I generate a connection to mysql through the following package , where I have two tables: 'rto' and 'vta ' And based on that build an INNER JOIN where I show what is required, now I need to execute that query...
asked by 13.06.2018 / 17:06
0
answers

Ionic gets the contacts very slow

By obtaining the contacts through the cordova-plugin-contacts plugin. When I run the script to get about 300 contacts is very delayed, it lasts 8 seconds approximately, does anyone know a solution? Ionic Info: cli packages: (/ usr / local...
asked by 12.07.2018 / 18:58
0
answers

How to import OpenSSL trusted certificates in Windows 10?

Hi, I'm trying to import an openSSl trust certificate for localhost where I have an Express server. I have seen options to do it on Mac, which is Keychain Access, but I can not find the way to do it from windows 10. I would like to know what fol...
asked by 31.05.2018 / 12:25
2
answers

Chaining of promises with mongodb querys

Good morning, I would like to know how to chain promises that have queries to the database (with a callback within the promise). On the internet I have found that a promise of javascript can be executed in the following way: function shareC...
asked by 16.05.2018 / 18:23
1
answer

how can I compile all the jade files in a folder at the same time in windows?

I have Windows 7 and I want to run the npm command and compile all the jade files that are in the lib library, this is the command I want to use: jade --watch --pretty lib/*.jade --out . and it generates the following error: Error: ENOENT...
asked by 25.05.2018 / 19:38
1
answer

Problems showing queries result in express + mongodb

Hi, I am trying to make an API that, given some ids, returns an array with each object found. The problem is that the app breaks when I consult the api as shown below. I would like someone to help me with what is happening as I am new with node....
asked by 04.05.2018 / 17:42
0
answers

Doubt with regular expression in Node JS

//Para traer el Id del estudiante , este me funciona perfectamente var idPatt ="[0-9]+"; var patt = new RegExp("/estudiante/id/"+ idPatt); //Para traer el nombre del estudiante //Creo que...
asked by 04.05.2018 / 21:03
1
answer

Give each player a different color when they log in

I'm doing a project which consists of a multiplayer minigame with Node , Express and Socket.io in which each player has a different color assigned by the server when entering and players will see a table which players have to paint the cell...
asked by 16.04.2018 / 16:13
0
answers

Mongoose Populate 2 arrays

I have a collection of products and another on the replacement of stock of the product. What I'm looking for is that when you get the products, all the product's stock dates appear, something like this: { "ok": true, "producto": { "rep...
asked by 06.04.2018 / 00:34