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
votes3
answers853
viewsNodejs Forever Not for
I have a Ubuntu server, and I used the command forever restart but I forgot that I had not installed a Node-module, that is, when I did the command forever list appeared he stopped, then I used the…
-
1
votes0
answers54
views"Reference path" and "import"
/// <reference path="arquivo.ts" /> import "./arquivo.ts"; What’s the difference and when to use each in Typescript/nodejs? It is necessary to be a file ts or I can directly import a js? Have…
-
1
votes0
answers223
viewsHow to invoke a url in the Node into an html page?
My files are these... regressao.js (regre.list(data) Which calculates the regression and returns values for atualizaPa.js (atualPA.atua(data,palavra) var db = require('../config/db_config.js');…
-
1
votes0
answers143
viewsIs Meteor.js a good framework for agile development?
I wonder if the Meteor.js is a good framework for web development. Lately I’m doing some research and I can’t find many sources of recent material. I haven’t seen strength in the Brazilian…
-
1
votes0
answers416
viewsCommunicate JS Node with java via socket
I would like to ask a question on how to communicate 2 servers, one being nodejs and the other being java. I would like to move information json between the 2 using socket support. I was able to…
-
1
votes1
answer284
viewsWindows Service on Node
I wanted to do a windows service using Node, since it is a very interesting technology that I am learning. So in my research I found several references to Node-windows. I found it interesting, it…
-
1
votes0
answers212
viewsSending error - Nodemailer
I configured my nodemailer as follows let transporter = nodemailer.createTransport({ port: 465, host: 'host do cpanel', auth: { user: '[email protected]', pass: 'minhaSenha' } }); and he makes a…
-
1
votes1
answer221
viewsPassport-local and Passport always returns false
I’m using Passport and Passport-local to authenticate with Nodejs, but the req.isAuthenticated method always returns me false, not even serialize when I log in. I tried to put a req.login() but then…
-
1
votes1
answer246
viewsCurl + HTTP Nodejs Server
Good morning! I created an HTTP server using nodejs as follows: var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({…
-
1
votes1
answer404
viewsConfigure Nginx for multiple Socket.IO servers
The idea here is to decentralize, make a load Balancing. In the following scenario: .1 a website serving multiple subdomains with Nginx .2 two or more servers nodejs spinning socket.io My need with…
-
1
votes1
answer47
viewsIndefinite value after consulting the bank
I have the following code: var async = require('async'), pgPromise = require('../utils/pgPromise'); function anyFunction() { var tripItem = []; var tripStartEndTripItem = []; var tripStartEnd =…
-
1
votes2
answers1062
viewsNode + Pokeapi "Error: connect ECONNREFUSED 127.0.0.1:443"
I’m new to the world of Nodejs, I’d like to know why I can’t test the most basic document algorithm https://github.com/PokeAPI/pokedex-promise-v2 my code is like this: var Pokedex =…
-
1
votes1
answer76
viewsFolder Size - File System
I’m trying to get the size of the folder that is my project, the folder is called Testes, and in my file server.js i am using the following method: fs.stat('/Testes', function(err,stats){ if(err)…
-
1
votes0
answers187
viewsRecording file from stream-webcam
I have a question about my stream code with getusermedia. I want to send my Node.js server a recording of my webcam. My form receives a video I can upload, but it would have a second function…
-
1
votes1
answer117
viewsTransaction in Postgress on Nodejs
I’m looking to encapsulate my SQL execution in the Postgress database. My initial wish is to call a method to execute a specific query and another method to execute a transaction of various queries.…
-
1
votes3
answers3589
viewsHow to pick a word within a string (phrase) in Node.JS
I have a doubt, have a string: var frase = "Ola, bruno"; I need to take what is written down to the comma and then take what is written after the comma, for example: var ABC = "Ola"; var EFG =…
-
1
votes2
answers336
viewsDELETE method using href - Nodejs
I am loading some information from the bank and one of the columns will be a link that will delete an infomation. By being in a table, the link href is like this: href="/delete/ID(vem do template…
-
1
votes1
answer528
viewsPossible to create an application with Angularjs without Nodejs?
I am interested in Angularjs, after having seen some examples of its use. I would like to explore this framework. In most of the tutorials I’m following it all starts with the installation of…
-
1
votes0
answers211
viewsWhat differentiates an Arrow Function from a function, say, "classica"?
I started a nodejs course and the instructor said the following code: modules.exports.addNote = function(){} Would be replaced by: modules.exports.addNote = () => {} What would be the difference…
-
1
votes0
answers218
viewsCallbacks that don’t get in my head!
Guys I’m trying to get the concept of callbacks before you start studying NODEJS. But I can’t really understand the syntax of callbacks... it’s just passing a function by parameter? função1…
-
1
votes1
answer46
viewsProblem with Javascript Method Return
const data_ = () => { let array = [] fs.createReadStream('./files/treinamento.csv') .pipe(csv()) .on('data', (data) => { array.push(data) }) .on('end', () => { console.log(array) }) } Using…
-
1
votes1
answer235
viewsSocket I.o does not update automatically
Hello, I am using Socket i.o and when I submit a POST /Enviatemperatura, it is not automatically updating on my website. What I’m doing wrong? Node.js app.post('/EnviaTemperatura', function(req,…
-
1
votes1
answer465
viewsHow to view data from a Node.js script in an HTML page
I wonder how I can run a Node.js script on an HTML page. The script is a Crawler, I mean, he pulls data from a page and I’d like to display the information he brings. I would also like to know if…
-
1
votes1
answer45
viewsStart nodejs in Azure
I have a problem to initiate the nodejs in the server Azure, I’ve set everything up and the site is already in the air, but I have a chat in Ode, using socket.io, see the code below (index.js): var…
-
1
votes1
answer103
viewsDocker and Nodejs
I have an application in Nodejs and need to configure the architecture of this application, I am new with Docker and need to create some containers for this application, the application must have…
-
1
votes1
answer112
viewsCheck if the given URL is an image
I am making an application in Node.js, and I want to make a system of custom backgrounds using the URL given by the user, I would like to know how to check if the URL given by the user is an image,…
-
1
votes0
answers41
viewsNode. js vs Io.js
I’m new here and I’d like to know more about the Node.js and the Io.js. I’ve been doing some research on both of them node.js is an execution environment to assist in writing Javascript programs,…
node.jsasked 7 years, 11 months ago Valeria Oliveira 11 -
1
votes0
answers171
viewsConfiguration Electron js in windows
I am studying Elektron js and followed this tutorial http://red-badger.com/blog/2016/04/18/building-desktop-apps-with-electron-webpack-and-redux/ but in windows there are some errors. At first it…
-
1
votes0
answers101
viewsSocket.io connects but does not send Emit to the server and vice versa. Nginx and SSL
I am using Nginx with SSL and this setting for a service to communicate with Node, when I access the address the socket.io normally connects with the server but does not receive Emit or send.…
-
1
votes2
answers482
viewsAuth rules with Nodejs + Passport + Mongodb
Let’s doubt it. I’m using a blog as an example. I have the Administrator. He does a complete CRUD within the system. Besides it I have the Editor and Reviewer. The Editor creates blog posts but does…
-
1
votes0
answers100
viewsHow to run npm script on Heroku in production?
I need to use Migrations from Sequelize in a Nodejs application that is already in production in Heroku, but I don’t know how to add the scripts in package.json so that the database migrations are…
-
1
votes0
answers565
viewsNodejs and Mysql authentication?
Does anyone know any article/tutorial/code that teaches you how to create a login system with session or cookies using Node.Js + Mysql?
-
1
votes2
answers71
viewsObjects em javascript
I’m having some problems with Objects while using them in Node js , I need an object like this : var clients = {}; var user = { [client.id] : { 'nome': 'osvaldo', 'sala': 'B1' } };…
-
1
votes0
answers53
viewsFirebase user update with SDK node
I am trying to update login data of a firebase user using the Node admin sdk. My code looks like this: var uid = req.body.uid; var objectUpdate = { "displayName": "David Coelho" };…
-
1
votes1
answer191
viewsHow to get DB value for a variable?
I have the following question: I have a database in mongoDB, I search the data by Nodejs it returns everything right, but I would like to play this value of the search for a variable, to make a…
-
1
votes0
answers247
viewsNode.js unhandled 'error' Event
'use strict' const http = require('http'); http.get({ hostname: 'localhost', path: '/user?name=jv&jovem=true&agr=19', port: 3000, agent: false }, function(response) { let body = "";…
-
1
votes0
answers29
viewsshow file as image
I am developing a site with Node js, it has functionality to upload/download files like (pdf, slide, docx, etc.). And able to show the files that were uploaded. Now I have a problem showing it in…
-
1
votes1
answer385
viewsNode.js Passport.authenticate is not a Function, how do I fix this?
As requested, I reduced the codes a little and kept only the essentials that I believe are involved with the problem. Reformulating my question: I have a simple registration in a modal (only name,…
-
1
votes1
answer3849
viewsRun a shell script with Nodejs
I need to create a page using nodejs, which will contain a "Turn on/Off" button. By pressing this button I intend to make the call from the same route, but passing a parameter: on/off or 0/1, etc..…
-
1
votes0
answers73
viewsSheetjs problem while keeping spreadsheet formulas while saving
The library sheet js. allows the creation and editing of spreadsheets of the type xlsx d Open office. Currently I have a spreadsheet that contains 3 pages as shown in the figure below. The page…
-
1
votes0
answers232
viewsLocalization using Nodejs
I’m starting with Node and I’m creating an application where I wanted to take the current location of the user and with this location I can make comparisons and if possible even save in the Bank. I…
node.jsasked 7 years, 9 months ago Reynnan Viktor 362 -
1
votes1
answer128
viewsSave uploaded file to Ajax in backend Node
Hello I have a backend in Ode and I’m getting this ajax request var arquivo = $("#assinatura"); arquivo.on('change', function (event) { if (arquivo[0].files.length == 0) return false; var data = new…
-
1
votes1
answer77
viewsJavascript possibly disturbing Mysql query
I recently started working with SQL databases and have had problems storing date columns in my tables. Basically what happens when I try to store a variable in the format yyyy-mm-dd, for example…
-
1
votes0
answers645
viewsHow to control transactions in Node.js?
I’m starting in Node.js and looked a lot about transaction control, but I haven’t found anything like what I’m used to in Java. First I’ll clarify what I mean by transaction control: Imagine a…
-
1
votes2
answers708
viewsFormat JSON in EJS
hello personal I am having a problem using nodejs and express, I have never used this language and I do not have much knowledge of it so I will try to be as specific as possible here. 1 I own a…
-
1
votes1
answer1369
viewsDouble association with sequelize
I have the following relationship with the sequel // Tasks.js sequelize.models.tasks.belongsTo(sequelize.models.users, { foreignKey: { type: DataTypes.INTEGER, field: 'ASSIGNEE', allowNull: true },…
-
1
votes0
answers49
viewsManage files on the server?
I am making a server using Nodejs and Express and in it I am generating pdfs of reports. How do I manage these files, and when I talk about managing I mean having options like opening the pdf,…
-
1
votes1
answer470
viewsTransfer files from the server to the client?
I am generating a PDF on the Nodejs server and when it is ready I want it to be sent to the client and downloaded, all this through a GET request. The file will be generated on the server, stored at…
-
1
votes1
answer73
viewsWEBRTC - Socket Node.js
I am developing an application using the following socket system (Using Firebase) for communication: openSocket: function(config) { var channel = config.channel || location.href.replace(…
-
1
votes1
answer337
viewsHow do I read from position x to position y of a line in Node.js via the readFileSync function?
I have a certain file . txt of which I intend to get some information, but this information is fixed at a certain position of the text line.
node.jsasked 7 years, 2 months ago LeonardoEbert 1,156