Questions tagged as 'node.js'

1
answer

Create splash screen in the Electron application

I need to create a kind of Splash Screen for an application on Electron. The organization would look something like this: Inicialização do App; Abrir a splashWindow (uma página frameless) por 3 segundos; Abrir a mainWindow normalmente. Reme...
asked by 11.01.2017 / 18:29
2
answers

Where in Join - Sequelize

Hello, I want to do a search inside several tables, for example: SELECT * from tab1 INNER JOIN tab2 ON tab1.tab2_id = tab2.id WHERE tab1.name LIKE '%blabla%' or tab2.title LIKE '%blablabla%' How would you do this query with S...
asked by 23.09.2016 / 22:06
1
answer

Node.js and Express - TypeError: Can not read property

I'm getting the following error in the console: TypeError: Can not read property '_id' of undefined I'm reading the book "Mean Full Stack Javascript ..." from the code house. During the development of the application presented in the book, I...
asked by 30.07.2016 / 06:49
1
answer

Return value 'undefined' because of asynchronism

I have a file named validationForgetPassword.js with the following code: "use strict" var config = require('./config'), createHash = require('sha.js'), pgPromise = require('./pgPromise'), winston = require('./winston'); mo...
asked by 11.08.2016 / 21:43
1
answer

Get information from a url using node + express + ejs

I have created a url in the following format: localhost:8080/forgetPassword/id/hash I have this route rendering: app.get('/forgetPassword', function(req, res) { res.render('pages/forgetPassword'); }); So I would like to target...
asked by 11.08.2016 / 18:29
1
answer

How to send a message to a specific room with Socket.io?

How do I send a message to a specific room? type: server.js io.in('roomA').on('msg', function(msg) { ... }); client.js io.in('roomA').emit('msg, 'Hi');     
asked by 22.05.2016 / 03:55
1
answer

Read file and assign each row to a different variable

I have the following file: mensagem 1 mensagem 2 mensagem 3 mensagem 4 I would like to read this file using the JavaScript language, and on each line, assign to a different variable.     
asked by 04.05.2016 / 16:19
1
answer

Get Geolocation Coordinates (Reactjs)

Hello, I'm developing a simple application that takes the geographical coordinates of google maps api. It's working, but I'm not getting the values that are in the other function. In fact I just want a way to get the Latitude and Longitude value...
asked by 26.06.2016 / 03:12
1
answer

Compare multiple arrays

I have two arrays, which are: data [ 0{ nome: a numero: 2 } 1{ nome: b numero: 3 } 2{ nome: b numero: 3 } 3{ nome: b numero: 8 } ] dataNota[ 0{ nf:...
asked by 03.05.2016 / 22:05
1
answer

Using Q promise to receive different apis values

I need to receive some APIS values. For example: calls to api1() and api2() return deferred.promise ; I can: api1().then( function(res1){ api2().then( function(res2){ console.log(res1, res2); }) }); How can...
asked by 29.06.2016 / 22:29