Most voted "node.js" questions
Node.js (or commonly Node) is a Javascript Runtime created with Chrome’s Javascript V8 engine. It allows you to run Javascript code without the need for a browser, raising the privileges to those found in other desktop languages. It is a technology strongly focused on non-blocking programming of I/O operations, which makes it very efficient for these operations.
Learn more…2,679 questions
Sort by count of
-
1
votes0
answers55
viewsAngular4 popup not working?
Guys, I have a problem at angle 4. I’m trying to use the component ng2-opd-popup. It installs right, but when I declare it in app.modules.ts it returns the following error: ERROR in Error…
-
1
votes0
answers256
viewsSigepweb Nodejs
I was able to generate the code and type the label checker, but the post office asks for a unique pattern for printing and I don’t know if Sigep-web already provides this in its API or not.…
-
1
votes1
answer809
viewsUse global variable in Typescript with Nodejs
I am looking for a way to use global variable in typescript with Nodejs. For example in js I can do: //init.js global.foo = "foo"; //teste.js var foo = global.foo; Is there any way to do this in…
-
1
votes1
answer429
viewsExpress Validator Custom - Nodejs
I’m using the express-validator in my api to validate the received data, I am creating a custom validation to verify that the user’s email is already registered in the system however, I can’t fire a…
-
1
votes1
answer4666
viewsHTTP (Post) Bad Request 400 - How to resolve?
I am making a pole, but my server is not emitting an error(400). Below follows the server code. const express = require('express'); const app = express(); const bodyParser = require('body-parser');…
-
1
votes1
answer1428
viewsRead user input without using the prompt function
The only way to assign value to a user variable in Javascript is by using the function prompt or is there any other? Because in Python, for example, we can do this: numero = int(input("Informe um…
-
1
votes1
answer252
viewsImport HTML Nodemailer
I’m using the nodemailer for sending emails on my server HTML in a variable, I wonder if it is possible to leave saved in a arquivo.html and just call his content to send that email. I’m currently…
-
1
votes1
answer867
viewsBase64 Multer Nodejs
I used the multer in my API, I uploaded the image, all right, but I would like to use Base64, here comes the doubt (I do not know much about base64), what’s the best way to do it? I made one in a…
-
1
votes1
answer472
viewsCreate new Ode in Firebase
I’m developing an Android chat room app using Firebase. The current structure is as follows (being Assedio, Beauty etc rooms): To date, user data is being stored with the Firebase standard,…
-
1
votes1
answer181
viewsHow to interpret React Native error messages
How do I interpret error mensgans like this? How much I work with React Native throughout the tests I always come across these mensgans. Only I don’t always know how to treat them. Does anyone know…
-
1
votes2
answers313
viewsUse INSERT using SELECT (Node.js and Mysql)
I need to insert some data into a table, using the following code: var query = `INSERT INTO uso (id_usuario, id_tempo) VALUES ((SELECT id FROM usuario WHERE nome='Jose' LIMIT 1), (SELECT id FROM…
-
1
votes1
answer271
viewsWhat use are the keys in the variables of Node.js
ola, I have a doubt a little amateur I’m starting with Node.js and through my learning I came across a situation and I would like to understand, in one of the codes I researched I found a variable…
-
1
votes0
answers177
viewsPass Session with Node.JS
Hi, I’m having a hard time with Session in an application with nodejs and angular 4. I’m doing it this way: By entering the email and password on the login screen and giving Ubmit in the login form,…
-
1
votes1
answer29
viewsEquivalent inspectdb function on Node
Hello! In Django there is a function called inspectdb that maps every database creating models of the model.py file. Is there a function or lib equivalent javascript or Node.js?…
-
1
votes0
answers38
viewsMisunderstanding in scope of function
Hello, I am developing a structure to start developing in Ode, I am beginner so forgive me anything. indexModel.js var Model = require('./model.js'); var model = new Model(); var data; class…
-
1
votes0
answers46
viewsRequire client-side
Good morning. In the company where I work, there is a kind of require client-side to import npm without it existing on the page. It is used to insert form scripts within the page. The code looks…
-
1
votes1
answer323
viewsStatus e-mail - nodemailer
Whenever I send a message using nodemailer I have how to get the example messageid : messageid: [email protected] It is possible to make a query to check the status of…
-
1
votes0
answers50
viewsREST API - Geoserver (WMS)
Good, How can I integrate Georeferenced data between a REST API (Nodejs) and a Geoserver to create a WMS? Thanks for the tips
-
1
votes1
answer121
viewsValidate path nodejs
Hello, I’m developing a file manipulation system, and I just want it to be possible to manipulate folder with an absolute path for example /opt/file. In other words, I can only create/edit/delete…
-
1
votes1
answer1991
viewsRemove Timezone on request with Node.js and express.js
I have a API with node.js and express.js. In the database the fields of the type datetime are saved correctly, but in response to a request GET date fields come with 3 hours more due to time zone.…
-
1
votes0
answers29
viewsGrunt creating wrong files
I’m using the grunt-hogan, in the Gruntfile is these definitions. "use strict"; module.exports = function(grunt) { var config; config = { hogan: { tmp: 'template.html', output:…
-
1
votes0
answers34
viewsDecrease code Nodejs
Hi, I’m developing a nodejs system with the express. However I’m facing something I don’t know yet how to solve, I need a code of mine to return result of a bank query: query = 'SELECT id FROM…
-
1
votes1
answer828
viewsHow to update the value of a variable within a callback?
I am creating a module with Nodejs and in this module I created a function that returns a value, being this value updated within a function of type callback. The problem is that this variable/value…
-
1
votes1
answer4034
viewsNodejs - Typeerror: Cannot read Property 'get' of Undefined
I am beginner in Nodejs and I came across this problem when I was exporting a module: "Typeerror: Cannot read Property 'get' of Undefined". I did not understand why the error occurred since the code…
-
1
votes1
answer1393
viewsres.json Nodejs/ Express
I have a cruel doubt in nodejs/ Express, I am very new in language but what I need is to pass the id in a route to execute and return a query. I’m wanting to do in fragmented files, so I have a…
-
1
votes0
answers22
viewsUpload file between API’s Node.Js
Hello, I have an API in nodejs, and I need to send a file to another API. Does anyone know how to forward the request? I’m using the https.request (https://nodejs.org/api/https.html) to make the…
-
1
votes0
answers221
viewsI can’t initiate nodemon
I am trying to initialize a project with postgre access but it does not start when running the command. follows the error : Error: listen EADDRINUSE :::3000 at Object.exports._errnoException…
-
1
votes1
answer132
viewsPassport forwarding error with express 4
I am having problems after user authenticate in form. Passport redirects to the root again, however it does not pass to the express GET of the route '/' and displays [Object Object]. If use…
-
1
votes0
answers57
viewsThis and Arrow Function
Because when using Arrow Function it returns Undefined. But when using a normal function it works correctly.…
-
1
votes1
answer576
viewsUse javascript inside an EJS file to display array information
I’m trying to show inside an EJS/html file the values of an array that are sent from the server, but I’m not getting it. I know that to show the value of a variable inside an EJS file all I need to…
-
1
votes1
answer1145
viewsExpress return post
Good afternoon, I am having a problem in the return of POST on express, I wanted to register users using the following code : router.post('/user', (req,res,next) =>{ var obj =…
-
1
votes1
answer1068
viewsPublish React.js windows server
I have an application developed with React + React-Redux and now that it is finished I need to publish. But when searching about it I didn’t find anything that explained or had a step by step how to…
-
1
votes0
answers77
viewsProblems with ESLINT Installation
I’m having problems installing the ESLINT (AIRBN) in VS Code, when I try to install, it presents the error below. I’ve tried to spin npm uninstall eslint and npm install eslint, close VS Code and…
node.jsasked 5 years, 7 months ago Thiago Maia 121 -
1
votes3
answers240
viewsRandomly choose files in Nodejs
I’m trying to create a bot for Twitter/Facebook/Discord that reads a pair of files randomly in a certain folder to post on networks. Basically in the folder there will be several JPG or PNG images,…
-
1
votes2
answers118
viewsWhy is object property automatically transformed into a string?
I’m using Nodejs and I have this problem: I have the following object: let obj = { id : { $gte : 5 } }; console.log(obj); //Resultado: { id: { '$gte': '5' } } Note that in the result, the property…
-
1
votes2
answers63
viewsHow to run server with loopback?
I have access to a project backend and would like to know how I do to rotate this project. It uses loopback and when reading the documentation of loopback, in instruction 4 says: Start the web…
-
1
votes1
answer82
viewsList all states in Node JS and Mongo
I’m trying to set up a function to list all the states and then print inside an object. Sorry to be so Noob, I think it’s a pretty silly problem. States function listarTodasOsEstados(){ var estado =…
-
1
votes0
answers24
viewsTo unite tables in Angularjs
I am in great need of a help from your knowledge. I am currently developing a web app for a restaurant with several modules. In the box module, in a <div> are displaying the requests that are…
-
1
votes1
answer129
viewsList items of an object in Pug JS, with Node and Mongo
I’m setting up a store, using Keystone JS, installed the dependencies Pug JS and Mongodb. I created a model that is pointing to a view, called Tour.JS The problem is that I couldn’t efficiently list…
-
1
votes1
answer46
viewsGET complex in Node.js API
Following good practices, what would be the most appropriate way to perform a complex GET to retrieve the products according to their properties? Imagine we have the methods for the Product Business…
-
1
votes1
answer58
viewsSort an array within an object, entering all hierarchies of it
I own an object that contains several arrays within it. And these arrays contain other objects that contain a field lpec_sequence that I would like that under every hierarchy, it was ordered by that…
-
1
votes1
answer245
viewsproblem reading external NODEJS Json
I have a problem to read an External Json but I can not identify, I have checked the json and it appears correct. that would be Json…
-
1
votes1
answer336
viewsSocket connection between servers
I have studied the communication between two (or more) servers raised in Nodejs via REST as I searched for content (references, explanations, benchmarks, etc.) I found indications of REST would…
-
1
votes1
answer85
viewserror installing github npm
I installed npm and set up my proxy after that when I try to install any library for example git hub, it appears these errors: npm ERR! node v6.11.3 npm ERR! npm v3.10.10 npm ERR! code…
-
1
votes1
answer67
viewsDifficulties to find() in the schema/model Mongoose with req.params.
As the title says, I’m having trouble making a find() customized in Node model/schema, which links with Mongoose. My file correspondencia.js (model) below: var mongoose = require('mongoose'); var…
-
1
votes1
answer450
viewsCompeting requests using Xios without losing the session
I am developing a Crawler using Xios. How can I make multiple requests or callbacks without losing the session and without having to manipulate cookies? Note the example below. When logging in, I…
-
1
votes1
answer922
viewsHow to upload a video using Multipart and Node.js?
I have an application that is being written using Node.Js, in which I use Ffmpeg to create a video from a webcam. I need to upload it to the server using a POST request. So the question is: How to…
-
1
votes1
answer576
viewsI cannot install Node.js
I am trying to install Node js. But at the end of the installation when running by cmd. Node -- version is shown the error below.…
-
1
votes3
answers1269
viewsGet file folder with Nodejs
Hello, I am trying to get the file folder but without success. I’ve tried with path, with __dirname, process.cwd(), but all return the complete path, for example: C: Node folder where is the.js file…
-
1
votes1
answer793
viewsGraphics for Node.js
I am developing a program in Node.js that generates reports in . pdf, with tables and graphs. I’ve been searching the internet and found several packages to generate these graphics, such as: D3.js…