Questions tagged as 'node.js'

1
answer

Re-use method

I made a query to search for a user. It worked! But I tried to make another query, he gave this message Error: Cannot use a pool after calling end on the pool Because every time I make a connection, I close it later, and it seems that o...
asked by 05.08.2018 / 17:49
0
answers

How to properly install express-processimage?

My project is in the last stage of completion, and the image upload and download implementation is working perfectly, the problem is that when I install the lib express-processimage my lib I was already installed and working perfectly as conn...
asked by 12.08.2018 / 12:42
1
answer

Generate an array from a query in mongoDB (Mongoose)

Good morning! I need the data from a mongo collection on the front end. I'm using Mongoose as an ODM, and I was a little lost in sending the data to the front end. In the query it returns me the documents in the collection, and then I need...
asked by 01.08.2018 / 14:09
0
answers

Generate chart using ChartJS on Express

I'm trying to render a chart using ChartJS. I'm using nodeJS (Express) and mongoDB. The idea is to get the data from the bank, go to the front, and from there, render the chart. I already have a little notion of how to do this, one option wou...
asked by 30.07.2018 / 16:12
1
answer

problem checking user already exists in nodejs mysql

I'm not being able to check whether the user already exists dynamically. Basically I want when typing the user name says whether or not I am using nodejs with express and mysql code controller / login const usermameverica = async (connecti...
asked by 10.08.2018 / 11:09
1
answer

returns data with module.exports node js

I'm having trouble returning data using module.exports, here's an example of how I'm trying to do module.exports.menu = (app,req,res)=>{ var fs = require('fs'); var patch = 'public/menu'; var conn = app.config.dbSyncSql();...
asked by 31.07.2018 / 14:04
0
answers

Send a blob to a webservice

Hello, it may seem Jr. the personal question but I have already tried searching the internet and nothing. I have the following scenario: A .NET API provided by a company to which I have to submit a file, and my BackEnd to NodeJS. This B...
asked by 02.08.2018 / 22:22
0
answers

require NodeJS (NW.jS)

Then I would like to know the following, if I work with node js to create sites I can create example: a file CONEXAO.jS and then give the require of it in another file to use it, so far and right. More I'm developing in nw.js. And I try to...
asked by 26.07.2018 / 02:58
0
answers

MySQL Read HTTP URL

I would like mysql to read a url through a SELECT I searched and saw that you have a here answer. I did the whole procedure as it is in this link , but without success The select would call the url as in this example here...
asked by 25.07.2018 / 23:48
0
answers

How to use save in Node js?

I'm having a study project using Node JS with MongoDB and I'm having a hard time saving a record in the database, I'm using the method that way. function postRestaurant (req, res) { var restaurants = new Restaurants(req.body); restaura...
asked by 24.07.2018 / 17:04