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
-
0
votes0
answers59
viewsHow to store Json on host site via Ajax?
<!DOCTYPE html> <html> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <title> teste </title> <body…
-
0
votes1
answer675
viewsread data from a url and download
hello, need to download various urls, run the code below within a for, but only works for the last url. var anchor = document.createElement('a'); anchor.href =…
-
0
votes2
answers38
viewsDefault of HTTP request
I am developing a restfull API. I have this route: /senha In the POST I saved the password; In the PUT i update the password; In the DELETE i delete the password; In the GET I call the password;…
-
0
votes1
answer124
viewsDownload corrupted with Nodejs
I created a server with Expressjs where I upload and download various files: FileController.prototype.downloadFile = function(req, res) { var filePath = "./upload/" + req.body.pasta + '/' +…
-
0
votes1
answer123
viewsError in Mongodb/Mongoose?
I am trying to start my server, however while trying to start it accuses error in Mongodb, and I have been for hours looking for the solution to this problem and so far found nothing. What’s even…
-
0
votes1
answer259
viewsIs the Node server the only option to support maximum level of requests in an application?
For an application project you will need to support on the server an immense amount of requests such as a e-commerce on the day of black Friday or the server of a game developer on the first day of…
-
0
votes2
answers139
viewsIs it possible to rewrite any code that uses pointers (C#) without using pointers in Node.js?
It is possible to rewrite any code in C/C# that uses pointers in a way that does the same thing without using them? My fear is more complex codes. The simple ones I believe are not difficult to…
-
0
votes0
answers2096
viewsUpgrading Angular CLI to the latest version?
I started a new angular design, it works well for me when I use: npm start However, I’m trying to use ng serve So I tried that: npm uninstall --save-dev angular-cli npm install --save-dev…
-
0
votes1
answer221
viewsCPU-intensive application blocks competing requests
In a web application it is common for each request to create a new thread that handles all processing and if for some reason the thread is blocked by executing a heavy task, the resource is…
node.jsasked 7 years ago Filipe Moraes 8,737 -
0
votes2
answers1426
viewsRender an html in Node with js
I can route in the Node where it calls an html page, but the html page has a file. js and when it is called the error of not finding the JS file. Can someone help me? Structure: main folder :…
-
0
votes1
answer698
viewsError inserting data in postgree: column "test" does not exist
In a crud basic, I’m getting the following Node error: "Erro na inserção dos dados { error: column "teste" does not exist at Connection.parseE (C:\Users\SUPORTE\Desktop\NodeFINAL\appFinal\app1\nod…
-
0
votes0
answers23
viewsClient application in Heroku
My application is a client application where it consumes a Proxy API and shows the data received in 'ejs'. But when deploying in Heroku, when I try to access the URL displays the message below:…
-
0
votes1
answer461
viewsNodejs return function - Mysql query
I’m not able to return value in function, I know it’s wrong, but I’ve made several unsuccessful attempts. The query is being performed and brings the password, the problem is to return this value to…
-
0
votes1
answer34
viewsTwo query operations on a Collection
I’m new to Node JS and mongoDB and I’m trying to run a find and then a update, but it doesn’t seem to be possible. Someone has an idea? function CarrinhoDAO(conexao) { this._conexao = conexao(); }…
-
0
votes1
answer150
viewsHow to Request External Nodejs File
How do I request an external file with Nodejs? In case it would be an XML... http://179.127. 4.122:8449/played.html? sid=1&type=xml…
-
0
votes1
answer1106
viewsUrl query Reach Route - React
I have the following problem: I have an API in Node.js that returns me id and name of products and supermarkets When I get into /supermarkets via params url /:idSupermercado I can get this parameter…
-
0
votes2
answers70
viewsPassport-local / I don’t understand the structure of the function
I am trying to implement the authentication system on my platform using Passport, Passport-local and Passport-local-Mongoose. I was able to apply login authentication: app.post("/login",…
-
0
votes1
answer931
viewsHow to send information from an html form to a route? - Nodejs
I am a beginner in Nodejs and am responsible for a project in this tool. I am using the "EJS" engine to create the views. I created a form, to send the information typed by the user, for a route and…
-
0
votes1
answer199
viewsHow to bring an image of a website in the Node API request?
I’m making an application and wanted after giving a request, that the API bring an image of this website as an answer. For example, in giving error 404, I would like you to bring that. How can I do?…
-
0
votes1
answer244
viewsWhat is the best/most efficient way to send data from a view to a route using Nodejs and Express?
I am a beginner in Nodejs and am responsible for a project in this tool. I am using the "EJS" engine to create the views. I created a form to send the information entered by the user to a route, on…
-
0
votes3
answers169
viewsModal doesn’t close on the Electron, how to fix it?
I have a modal problem. My problem is that the modal, does not close when clicking the button, I tried several ways, but none worked. How can I fix this? <script> var read =…
-
0
votes1
answer52
viewsNODE.JS server does not run
I’m starting to study Ode now, and I’m already facing this problem. Follow the code: var http = require('http') http.createServer(function(req, res) { res.writeHead(200, {'Content-Type':…
-
0
votes0
answers697
viewsError: ORA-01461: can bind a LONG value only for Insert into a LONG column
I’m getting this error on Oracle. Error: ORA-01461: can bind a LONG value only for Insert into a LONG column When executing the code below that the error is presented, I would like to know how to…
-
0
votes0
answers68
viewsHow to properly verify the existence of a user in a Restful API (Nodejs) by sending Login and Password in a GET verb?
Verifying a user’s existence through a Restful API would be a GET transaction given that it would only be a select. Briefly would be sending the Login and Password this way: const validator…
-
0
votes1
answer993
viewsreq.body is coming empty when calling api on Postman and the application
I am consuming an api in nodejs but I cannot pass the parameters req.body is becoming empty and I cannot identify the problem var express = require('express') var app = express() var bodyParser =…
-
0
votes1
answer311
viewsMongoose Nodejs: error when connecting with Mongodb
I am trying to connect to the Mongodb database but the following error occurs: My code: when I run the mongod server command: If anyone can help me find a solution, I’d be grateful…
-
0
votes0
answers24
viewsEnum and default does not work?
Greetings dev’s, I have the following schema in my app: const customerModel = new Schema({ ... roles: [{ type: String, required: true, enum: ['user', 'admin'], default: 'user' }] }) However, when I…
-
0
votes1
answer518
viewsError running "npm run Prod" command in Git Bash to build an Ionic 2 project
I have a publication ready project, which was created with Ionic 2 using Google’s Firebase API, but when I try to build the project for production, with the following command in Git Bash: "npm run…
-
0
votes1
answer36
viewsNode assync Function does not return data
index js.: $.ajax({ type:'POST', url: 'http://localhost:3000/login', dataType: 'application/json', data: {username: username, password: password} }) .done(data => { console.log(data); }); in my…
-
0
votes1
answer336
viewsListen to messages with multiple customers(pub/sub)
If I want to be able to have multiple users and channels, do I need to have each user create a client in redis (or whatever the pub/sub used) to subscribe to the channel? And how would you get the…
-
0
votes0
answers38
viewsError socket.io Node.js api changenow
I am developing a exchange system and need to receive in real time the status of transactions and exchange information, following the documentation changenow. but I always get the following error:…
-
0
votes0
answers110
viewsnpm ERR! - When executing some command in the application
It was with the application in Nodejs working normally, but now it starts the application. But when I execute any command it presents this error. I’m using the Sqlite3. npm ERR! Windows_nt…
-
0
votes1
answer107
viewsRestore dump with nodejs
Precise restore a postgres database nodding... My routine downloads the latest backup (custom dump) by ftp, and creates the database (without the structure). Now I need to run this file I downloaded…
-
0
votes1
answer85
viewsPush array only works inside callback
I am trying to update an array with values returned by Mongoose. But the array returns empty. It follows the code snippet: let y = []; Vendas.countDocuments( { dt_encerramento: { $gte: jan, $lte:…
-
0
votes0
answers61
viewsRaspberry PI does not load page
We developed a page using Laravel to load on Raspberry Pi Load normally, only there was a need to change technology. We did not change to angular/cli The angled page does not connect. Gives Gah!…
-
0
votes1
answer1457
viewsError trying to install Nodejs
Somebody help me solve this problem? Log file link created tap here to view…
-
0
votes1
answer112
viewsNodejs - Expect for to run all pool.query by the end
I have a small problem and as much as I have tried to find a solution, I cannot think of a great one. So I have come to ask for your help! So here’s the thing, I’m currently developing a betting…
-
0
votes0
answers378
viewsPull images in HTML with Node Js + Express
Guys I’m starting with the nodejs and I have a question. Whenever I call ima image or even the bootstrap in my file I have to use sendfile. Whenever u by an icon or image I will have to set the…
-
0
votes1
answer682
viewsModularize Nodejs Connection with Postgresql
I’m having trouble creating a module on nodejs to export my connection to PostgreSQL. I couldn’t understand why according to code does not work as I would like to export connect. Code 1 . var pg =…
-
0
votes0
answers137
viewsProblems sending requisition to Cielo
I am setting up a transparent payment method for Cielo and I use Ode on my server I have already set up my Json. But I can not send the data correctly to Cielo, someone knows some way to send the…
-
0
votes1
answer45
viewsDoubt Command Require
I’m trying to use the require command but this giving error, I’m trying to use in the following code: var Parser = require('C:/Users/gabri/OneDrive/Área de…
-
0
votes1
answer74
viewsnpm Review does not work locally or in hosting
I have a Node application that I run with the command: node server.js But when I close the terminal where the command was executed, the application closes. Researching found package npm Forever. I…
-
0
votes1
answer236
viewsHow do I upload a Nuxt project to a server? (Namecheap)
personnel what files of a project in nuxt I must go up to a server, in case I use the Namecheap. surrounded the npm run build (on my machine), and a folder /dist was created inside the folder .nuxt…
-
0
votes2
answers427
viewsWeb automation with Selenium or other tools without opening the nagevador?
Hello, I use Selenium in Nodejs to log in to a site and then get all HTML code generated, because in this HTML has a table and precise turns it into a json. Do an automation open a browser to…
-
0
votes2
answers104
viewsDisable/delete Docker container marked with Restart: Always
I started a service on Docker with the image of the db icon, follow Docker: version: "3.1" services: mongo: image: 'mongo' container_name: mongoapp restart: always image: mongo volumes: -…
-
0
votes2
answers2793
viewsBack-end and fron-end communication
I am learning Reactjs, I made on the front end a simple screen of registration and I made the back end generating Ips with Nodejs, following this tutorial:…
-
0
votes0
answers233
viewsRequest to Cielo with Node.js
Giving the following error code: TypeError: First argument must be a string or Buffer My code is like this: request: function (dataJson, callback) { var options = { hostname:…
-
0
votes3
answers1610
viewsConcatenate single quotes into date variable?
I have an application in Vuejs and need to concatenate simple quotes in a variable that has a date like this 2017-11-09T02:00:00.000Z . I tried it this way and I didn’t succeed: var novaData = "'" +…
-
0
votes2
answers138
viewsAngular interpolation not updated
I’m learning angular and I’m having a difficulty, the program is very simple has a textInput and a paragraph, which if typing in the textInput should appear in the paragraph. onKeyUp(evento: any){…
-
0
votes0
answers109
viewsMysql module running wrong script - Node Js
I am developing a simple system of customer persistence, products and sale. I have made a API using the express and module Mysql, but something strange is happening and I really have no idea what it…