Questions tagged as 'node.js'

0
answers

Calculate file size of a dataURL (cost)

I'm uploading an image in base64 ( dataURL ) to an application that uses express. As the user is doing the "clipping" of this image in the front end I did not find another way to send but by dataURL ... the application has a gener...
asked by 12.12.2017 / 13:19
0
answers

I can not start nodemon

I'm trying to initialize with nodemon a project with access to postgre but it does not start when running the command. follows the error: Error: listen EADDRINUSE :::3000 at Object.exports._errnoException (util.js:1018:11) at exports._...
asked by 10.10.2017 / 16:42
1
answer

Why and when to use "res.send ()" in an application? NodeJS and Express

Well, I'm a beginner in NodeJS and I started studying for academic purposes. In another question I made here in SO-BR ( What is the command" res.send () "in Express? ) I asked what this command was for and it was answered very well, but the prob...
asked by 09.10.2017 / 01:35
1
answer

Mongodb seeks to return internal arrays

Example structure: { "_id" : ObjectId("598d4eb912f28534d80a5820"), "nome" : "Emilio", "produtos" : [ { "_id" : ObjectId("598d4fb912f28534d80a5821"), "nome" : "produto1" }, { "_id" : ObjectId("598d4fb912f28534d80a5...
asked by 11.08.2017 / 09:25
0
answers

Configuration of Response Headers

I created a server in Express and my client in Quasar / VueJS. I need to send a PDF to my client, the PDF in question is already created on the server, but I'm having trouble sending it to the client. I'm using Axios to make client-side requests...
asked by 15.08.2017 / 15:05
0
answers

How to read a local txt file in Javascript

Hello, I'm a beginner in Javascript and I'm watching some videos on youtube about reduce and my doubt is, in the video it puts a code at the top of the file. import fs from 'fs' But when I put this code in my js and try to compile (node fil...
asked by 18.07.2017 / 02:25
1
answer

How do I do an "onload" on NODE.JS? (Discord.js)

I've been trying to make a code to generate an image on node.js using Canvas , but I'm facing the problem that the image is not loaded before using it. I tried using "onload" but that did not work (I never ran the code) Here is the "base"...
asked by 05.06.2017 / 20:42
0
answers

How to package electron application for windows

I currently create an application with electron, so I added external javascript scripts with scriptsrc to work on both electron and web page. But I'm having trouble generating the executable for windows with electron-packager The problem i...
asked by 05.06.2017 / 16:42
0
answers

How to check if the EJS is responding

My application is node with express and ejs 1 - It is running index.html and not index.ejs 2 I am not able to pass the title or title parameter to the view, neither in ejs nor in html app.js and index.ejs look like this: var express = re...
asked by 05.07.2017 / 09:20
1
answer

Convert a stream to string?

I'm getting emails from the inbox of an account I created for testing, I'm looking for them with the node-imap and parsing them with MailParser and I'm getting the most of the information I need except the email text, because the same is in...
asked by 23.08.2017 / 16:49