Questions tagged as 'node.js'

0
answers

javascript function does not assign value to variable

I have a query function to bd that returns a javascript object, but when I assign the value of this function to a variable, it returns undefined, I suspect it is because the node.js is single thread, but I do not know how to solve it. follow...
asked by 12.01.2018 / 15:25
1
answer

Send Array of objects to Bulkcreate

I am using Node JS (backend) with sequelize 4.4.2 and need to send an array of objects from my front (React JS) but I can not generate in the format that is expected, just to comment when I did a test (hardcode) it worked fine inserted the data....
asked by 03.01.2018 / 14:01
0
answers

Extension for Chrome + Nodejs

I would like tips for developing extensions for Chorme (and other browsers) using NodesJS . Why NodeJS ? Well I would like to give some protection to my JS codes so they are not visible or subject to change, I have a beginner knowledge of d...
asked by 26.12.2017 / 16:49
1
answer

Deprecated mongoose method

I'm trying to make a connection with mblab but the connection method is deprecated. Version of the method is 4.9.7. What I need is 4.13.7. Structure: server.js const express = require('express'); const morgan = require('morgan'); con...
asked by 26.12.2017 / 04:59
1
answer

Return query result with node

When I do a select in my MYSQL , I get the answer and I can display this for the user, but the problem is that this is not enough, just get the result and display it, I need to, for example, check if a given id has data in a table, and if it do...
asked by 20.12.2017 / 15:11
0
answers

Problem to save image in Node and React

I'm trying to upload images to my server using node and React, however, when I try to upload, it generates this message to me:    Not allowed to load local resource:   file: /// C: / fakepat: 3000 / record / 1h / pastedImage.png I can not...
asked by 03.01.2018 / 21:11
1
answer

hbs file does not redraw

I am making an application with backend Node.js and Handlebars . I'm having a hard time rendering the layout.hbs file, I've done some testing on the server.js and main.js files and the routes are ok . <!DOCTYPE html> <html l...
asked by 18.12.2017 / 00:47
1
answer

Indexes in Mongo

I'm starting studies with indexes. I have a base in MongoDB where the documents have about 10 fields. Searches can be done using all these variables. I created an index with all the fields, and I thought it would work ok, but I always get a "...
asked by 15.12.2017 / 06:07
1
answer

Chart.js installation failed

I'm trying to install chart.js in my project created in eclipse but every time I run the installation code error appears. npm install chart.js --save     
asked by 19.12.2017 / 18:55
0
answers

Insert error: this._connection is not a function

I'm trying to make an insert into the bank using nodejs and mongodb, but I get the following error: TypeError: this._connection.open is not a function at UsuariosDAO.inserirUsuario (E:\docs\projetos\task_manager\app\models\UsuariosDAO.js:1...
asked by 07.12.2017 / 19:34