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
votes1
answer32
viewsWhat are the main differences between REACTJS and Handlerbars?
I’m starting in web development now, I’ve learned to develop a simple application on the web. I am using handlebars as my view engine, but I would like to know the difference between reactjs and…
-
1
votes1
answer2383
viewsError connecting Firebird database to Nodejs
I’m trying to connect to a Firebird test bench with Nodejs, and I’m using the package node-firebird, and I’m having the following mistake: node index.js Error: Connection is closed. at…
-
1
votes1
answer31
viewsfilter the name of an obj according to the highest number
I got the program to show the highest value within an obj. However, the exercise asks me to disclose the name of the highest value obj. let maior = 0; for (let item of obras){ if (maior <…
-
1
votes0
answers542
viewsNodejs Error: "ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client"
Good, I have a problem in my application, however I still can not understand well the reason for this error, since this only happens if a user update his password and then try to login. //Function…
-
1
votes0
answers407
viewsreq.body returning Undefined when using consign in the application
I am familiar with express, so I created a simple form with two fields, I have a JS file where I receive the data of the form and send them through the xmlHttpRequest and on the server side, I’m…
-
1
votes1
answer31
viewsRoute is not executed when called after Paypal checkout
Successful route is not activated after Paypal checkout that redirects to /Success PS: My view is in English. This is the part that is not being called when accessing /Success app.get('/success',…
-
1
votes1
answer144
viewsnodejs and express with connectiontimeout(H13) in Heroku
Hello, I have an api in Heroku and There communicates with the pagseguro api(notifications), the wheel that handles the notification needs to take the transaction code that is received per post,…
-
1
votes0
answers15
viewstake a click event and send it to the backend
Hello I have a question wanted to know how to capture a click event and send to the back end, I thought to do with routes but I think it would not be cool, I am using Node
-
1
votes1
answer161
viewshttps.request does not send body if it is the DELETE method
I’m making a request to make a DELETE, and I have a problem, when I make the request, the bodyParams is not past. Has anyone ever had a similar problem? On the other side I’m using the express…
-
1
votes1
answer206
viewsHow to use the value of a variable to define an object key?
I wanted to return a Mongodb JSON with some filters, the problem is, when I try to pass a variable through the function, it doesn’t work, this is the code: async find(req, res) { const { filter,…
-
1
votes1
answer185
viewsReceive array values from the console
I am starting the studies in Ode and decided to do an exercise in which I need to receive a value n by the Node console that will be the amount of elements of an array and receive n elements by the…
-
1
votes1
answer395
viewsRelating Javascript file to an HTML
I’m a beginner in the Node world, and I’m having trouble relating a . js file to an HTML. I took a simple code, in it I have a combobox that is filled when pressing a button: //app.js var express =…
-
1
votes0
answers64
viewsSequelizedatabaseerror - Syntax error when creating an ARRAY field in Graphql with sequelize and mysql
I am developing a basic API for blog graphql with Sequelize and Mysql as a database, everything works perfectly until I try to create a new keyword field of the Array type, for blog posts, I believe…
-
1
votes0
answers182
viewsHow the Node.js "npm run proxy" command works
I want to do some work on the open source game Codecombat (https://github.com/codecombat/codecombat). I managed to install the game, but in the community (in English) I was recommended to execute…
-
1
votes4
answers84
viewsHow to do a sequential for with nodejs version 8?
The nodejs version is: V8.10.0 I don’t know much about Ode. In this specific case I need the next iteration to be executed only after the previous iteration has been completed. Also, I need that…
-
1
votes1
answer365
viewsPublic Directory - Node.js
Public Directory Node.js I’m having problems releasing a public directory on Node.js. I need everything in the directory public is accessible via direct URL. I’ve tried to use…
-
1
votes2
answers421
viewsJavascript - error callback is not defined
I’m running a few asynchronous functions, who receive a callback, this callback gets as parameter a Boolean(true or false). When executing I have the error callback is not defined. [code] file -…
-
1
votes1
answer125
viewsGetting no answer Socket IO
Hello, Can you please tell me where the mistake is ? I created a file in the root folder, server.js var socket = require( 'socket.io' ); var express = require('express'); var app = express(); var…
-
1
votes1
answer37
viewsControl the data that Mysql sends to Nodejs
I developed a Project that "clones" a proposal and its products, in addition to making some updates, but the return that this procedure returns to my Nodejs is not very useful to me. It is possible…
-
1
votes0
answers665
viewsPost post Submission with Axios
Hello, I’ve been bumping my head to solve a problem with sending a POST request from a SOAP envelope with Xios, I send the same XML with the same Reset by POSTMAN and it works pretty good, but when…
-
1
votes1
answer73
viewsBug in app algorithmia
I’m trying to run the following code: const algorithmia = require("algorithmia"); function trigger() { const url = {"url": "https://www.facebook.com/filipedeschamps?epa=SEARCH_BOX"} const apiKey =…
node.jsasked 5 years, 6 months ago Romario Sousa 25 -
1
votes1
answer143
viewsIs it correct to create two servers in the same Nodejs app with Express?
I am creating a Nodejs application with Express and I am looking to observe all the "best practices" recommended for system security. In this system I’m thinking of having two open ports (but I…
-
1
votes0
answers23
viewsLock key redis and nodejs
I’m having a headache with multiple processes writing in the same key. Is there any way to lock a key, both for writing and reading? cluster.js const cluster = require('cluster'); const cpus =…
-
1
votes2
answers687
viewsSequelize making incorrect select
I have an api in nodejs www: ... db.sequelize.transaction() .then(() => { server.listen(port); server.on('error', onError); server.on('listening', onListening); }) ... models: 'use strict';…
-
1
votes1
answer232
viewsProblem with Mysql Pool conections
I have this class I use to create the connection: class DbConnection { constructor() { this._con = undefined; this._pool = undefined; } _createPool( database , user, password ) { this._pool =…
-
1
votes0
answers794
viewsHow to send form parameters using Express and Node.js
Hello, I’m trying to post the data of a form using Express, follow the code below index.html <form action="insere" method="post"> <p><h4> Título </h4> <input type="text"…
-
1
votes0
answers128
viewsTypeerror: Cannot read Property 'id' of Undefined
Routes: const express = require('express'); const router = express.Router(); const controller = require('../controllers/imoveis-controller'); router.get('/:id', controller.getById); router.get('/',…
-
1
votes1
answer173
viewsSequelize Associantions
I have 2 models: user Features: const DataTypes = require('sequelize'); const database = require('../config/dbconnection'); const user= require('./user'); const user_features =…
mysql node.js join mariadb sequelize-jsasked 5 years, 5 months ago Guilherme Monteiro de Oliveira 21 -
1
votes2
answers94
viewsProblem when creating client
I can’t raise a client in Asmin. I can create an invoice, and access the data, but I’m not getting a customer. This is the request I’m making on js: function createClient(token) { var…
node.jsasked 5 years, 5 months ago user2638929 11 -
1
votes1
answer269
viewsNODE/EXPRESS/BODY-PARSER I’m not able to read the body, keeps giving UNDEFINED
Well I’m going to post the index here for you to look at, I reworked the code and it worked for another purpose, but with this purpose of taking the information and sending it to the Undefined…
-
1
votes0
answers1053
viewsPagination with sequelize + Node.js
Hello, I am developing an application Node.js where I have to list a register of classes. But as the number of records are many need to make a pagination, I achieved this by making a function with…
-
1
votes1
answer3867
viewsHow to redirect to another page using angular 7
I am making an application using angular 7 with angular/cli, but I find myself in a problem, I finished my login screen and I want to redirect to Dashboard; But I find where the router-outlet opens…
-
1
votes1
answer189
viewsProblem with routes
When trying to access konic.com.br the site is loaded normally, but when I enter another route that in the case of konic.com.br/contact it returns 404 app js.: const express = require("express");…
-
1
votes1
answer828
viewsHow to Save and Recover Images in Base64 using Mongoose in a Nodejs Service?
I need to save and recover an image in Base64 through a REST service developed with Nodejs. For this, I have created the following schema on Mongo: const userSettingsSchema = new Schema( { 'avatar':…
-
1
votes0
answers121
viewsIonic 4 + Nodejs: Module not found: Error: Can’t resolve 'dgram' in
I’m creating an app using Ionic 4. In this application I need to use some libraries of Nodejs: dgram, fs, path and among others. But when I run my application, it returns an error message Module not…
-
1
votes1
answer507
viewsHow to install Node.js v.10 on Linux (16.04 LTS)
I’m following the documentation on the official website of Node for its installation in an environment Linux with Ubuntu distribution, which in turn redirects to this page on github demonstrating…
-
1
votes1
answer329
viewsI cannot get result from my updated object list
I am developing the back of a web service and will be my first application in Nodejs v11. Do not notice the lack of separation of 'business rules' with 'bank manipulation' because I am having…
-
1
votes0
answers38
viewsLimitation of 6 Requests followed in ajax
Hello, I’m making an application where I make an ajax request to register in the bank, the request is working smoothly. However I noticed that only accepts up to 6 requests in a row without updating…
-
1
votes1
answer2953
viewsDoes anyone know how to resolve Error: "Failed to lookup view" in nodejs?
My folders: The "admin.js" file contains my routes: const express = require('express') const router = express.Router() router.get('/', (req,res)=>{ res.render("admin/index") })…
-
1
votes0
answers20
viewsHow to aggregate in mongodb via a Repository in javascript/Node?
I have a repository that makes a query in the collection logsMonitrip. The method below is called by the service when the user tries to make a query through the company’s cnpj, after that I get the…
-
1
votes0
answers60
viewsHow to get the X-Forwarded-For (IP) header from Passport
I’m using express to create route for my application. To login I have a route to authenticate using Passport and Passport-local. I need to compare the user access IP with the IP of the user that was…
-
1
votes1
answer1128
viewsPass parameters on express redirect + Node + ejs
Hello, I want to pass parameters in redirect the same way I do in render method, I need it redirect because I do not want to render a page but redirect to the API route that is already rendering the…
-
1
votes1
answer902
viewsSending e-mail through Nodejs
I am beginner learning Node.js and I am caught in a question of sending email on the site as if it were that ''contact us'' using Node.js The point is, I can send the email, but it only sends when…
-
1
votes1
answer481
viewsSelect 'select' through Puppeteer
I need to select a value within a <select>, but I’m not succeeding... I once did that same function of selecting a value in a <select> but this time I’m not getting to make that…
-
1
votes1
answer369
viewsConfigure sublime 3 to compile Nodejs
Hello! I’m 2 days looking for a solution to make the sublime 3 compile a Nodejs app that I have. I have tried several solutions found on the internet…
-
1
votes1
answer1678
viewsPass header value for Nodejs API
Good personal day I am with following problem, I have an API to be consumed, but it expects a return token validated internally, this token is passed as parameter via header, but I do not use JWT, I…
-
1
votes0
answers42
viewsHttprequest using Angularjs, Nodejs and Express
I’m new to these technologies and I’m trying to make an http call (get and post) via html but it’s giving error, I’ve seen several topics here and elsewhere but I can’t make it work. Someone can…
-
1
votes2
answers164
viewsNode.js server error (ejs)
hello I have that code: router.post('/loginCli', function(req, res, next) { var j; conn.query('SELECT * FROM bdlabella.tbclientes order by email_cli', (err, results) => { if(err){…
-
1
votes2
answers381
viewsMongoose pre method, returns this as empty object
I have the following model, where when registering the user in mongodb , I want him to encrypt the password using bcryptjs, using the Mongoose method UserSchema.pre('save'... const bcrypt =…
-
1
votes1
answer65
viewsOrganize a matrix
I have an array containing 16 objects, each object has the title, and definition attributes. I need to put inside each object in the definition attribute,. [{ titulo: universo, definicao:["(Física)…