Questions tagged as 'node.js'

1
answer

Table with PUG in NodeJS

I'm using PUG template in NodeJS and am looking in documentation how to set up a table. I'm checking in "pugjs.org", but it apparently does not exist ... Does anyone know how to set up a table with PUG?     
asked by 14.07.2017 / 01:51
1
answer

How to make an alert in the browser, using node.js

I'm beginner in node.js , I know the main function of the node is not this, however I want to learn a little more about this event, another doubt that I also have is if I can use common javascript functions in the middle of my code node. I...
asked by 27.07.2017 / 06:19
1
answer

Import HTML Nodemailer

I am using nodemailer to send emails on my server node, however I did not like to store all HTML in a variable, I would like to know if it is possible to leave saved in a arquivo.html and just call the content of it to send...
asked by 11.09.2017 / 15:32
1
answer

2D drawing on Node screen without having to compile anything

Is there a Node module that allows on-screen printing (same bitmap) without having to compile anything?     
asked by 05.06.2017 / 22:59
1
answer

TypeError: uri.indexOf is not a function

I'm doing a crawler using node.js and mongodb to save the information in the database and I have the following code: var request = require('request'); var cheerio = require('cheerio'); var save = require('./savedb.js'); var URL = require('url-...
asked by 01.06.2017 / 01:08
1
answer

Problems with static page encoding

I have an html file sent from a Node.js server that can be accessed here that is having problems with the accent . They were working normally, however, after a minor update, he had this problem. When I open it with localhost, it works, but...
asked by 07.06.2017 / 22:10
1
answer

How to fix charset="UTF-8" in application nodejs inside socket.io

I have a chat app and am working with nodejs and socket.io . But I'm having trouble coding names. The following name: Guilherme Loução is coming as: Guilherme Louçço . I already saved the file in UTF-8 format and it did not work....
asked by 07.06.2017 / 16:33
1
answer

Sequelize Migrate - Error: TypeError: defineCall is not a function

Hi, I'm doing a simple championship API, I used Sequelize as ORM for my database. I created the Arbitrator table that had only the NAME field and did not have the CPF field in the table. I had to include the CPF field in the Arbitra...
asked by 20.05.2017 / 18:24
1
answer

UnhandledPromiseRejectionWarning: I believe it is after searching on mongodb

I believe that this problem is in this part of the code, funny that used a very similar code but does not give the error: UNSOnline.post('/resetpass', (req, res) => { db.collection('alunos').findOne({email: req.body.email}) .then((doc)=>...
asked by 04.06.2017 / 16:36
2
answers

Body NULL NodeJS

I'm starting with nodejs, but whenever I try to send (email and password) to the API via POST, the typed values are returned as NULL. router.post("/users", function(req, res){ console.log(req.body) let query = "INSERT INTO ??(?...
asked by 24.05.2017 / 16:26