Questions tagged as 'node.js'

0
answers

Render chart using mongoDB and chart.js

Hello, I have a question on how to render a chart with chart.js using mongo data. I've already been able to render one, but I'm having trouble rendering another, probably due to how the data is returning. The query is as follows: const t...
asked by 20.08.2018 / 15:04
0
answers

Problem reading page

I'm reading data from a page. But I would like to read this data every 3 seconds or every time the node has finished reading the data. I'm using this function here: const getScript = (url) => { return new Promise((resolve, reject)...
asked by 20.08.2018 / 20:26
1
answer

How to run http-server node?

I'm trying to install http-server npm install http-server -g But it is giving this error, I already configured the proxy, what can be? log: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1...
asked by 20.08.2018 / 20:36
0
answers

I can not use validator.min.js in the pug engine

I want to use the functions of the validatorjs in the pug engine, however I can not use it, my file validator.min.js is ./public/javascript, here is my code in the pug: html head title= message script(src="./public/javascript/valida...
asked by 20.08.2018 / 15:05
1
answer

Node.js: How to extract information from the database and show in HTML pages

I've learned how to fetch information from the MySQL database, but I can not manipulate this data to expose it in HTML pages. The code that I will expose below I got from w3school: var mysql = require('mysql'); var con = mysql.createConnectio...
asked by 20.08.2018 / 18:43
0
answers

nodejs of the error and for server after 2 minutes

Good night, I have a basic program that until yesterday was good, today the afternoon began to the error in the execution of the "nodemon app" or just the "node app" follows the error:    throw er // unhandled 'error' event error: read ECON...
asked by 25.08.2018 / 01:13
0
answers

Error Nodejs + Msql + Google Charts

Hello everyone, I'm starting on the Node and I got a F .. logo from kra. develop an API for a Dash and use Google Charts. I already researched and collected some ideas from here of the forum then; I did so; google.charts.load('current', {...
asked by 17.08.2018 / 19:31
0
answers

Split and Merge PDF on Nodejs using Electron

I would like to know which npms tools are recommended to receive a PDF file of any size and divide it into equal pieces. For example pick up a 40Mb file and create 5 8Mb files. I intend to do this within an application running on the Electronjs....
asked by 16.08.2018 / 21:07
0
answers

NodeJS and PM2, do not arrow environment variables

Hello, Good evening, everyone, I have a problem with setting my environment variables. I have the following json running on PM2: module.exports = { "apps" : [{ "name" : "frontend-homologacao", "script" : "/var/www/html/site...
asked by 16.08.2018 / 01:56
0
answers

Node requests and module exports

Good afternoon guys. Someone can get me a doubt. I have an application node.js with a str //index.js var express = require('express'); var app = express(); var valor = require('./valor'); app.get('/:valor', function (req, res) {...
asked by 28.08.2018 / 18:31