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
-
4
votes1
answer858
viewsIntegrating HTML + Node.js with Angular.js in "Real Time"
I’m having some problems automatically updating a code in Angular.js within my site. The integration is Node.js with HTML, integrating with Angular.js. But I always have to give F5 on the page for…
-
4
votes1
answer2136
viewsnodejs, get value from a SELECT mysql
Well, I wanted to know, how can I take this result, and turn into variable and be able to use within functions in the script, example take this Name Warrior and use as if it were a variable, like:…
-
4
votes1
answer10235
viewsWrite file . txt Node.js
I need to generate a txt file with some information and save it to C: How can I do this using Node.js?
-
4
votes1
answer375
viewsHow do I receive emails in my web application?
I am making a web application (front-end in Vuejs/Quasar and server in Hapijs) and I need it in addition to send also receive emails. I am sending it through the Nodemailer library, and it is…
-
4
votes1
answer110
viewsNodejs because so many files
Good afternoon, everyone, I’m starting a short time with Nodejs a little project in VUEJS, and I saw that when I give the command NPM INSTALL it creates about 20,000 files, my application gets to…
-
4
votes2
answers4742
viewsWhat is the "res.send()" command for in Express?
I am studying Nodejs for academic purposes and during the implementation of a project I came across this command. What it serves?
-
4
votes1
answer114
viewsBind by SQL Server position using JS Node (MSSQL)
I wonder if it is possible to bind the parameters by position instead of the name using mssql in Nodejs. Ex.: //Por nome return pool.request() .input('input_parameter1', sql.Int, 10)…
-
4
votes1
answer2404
viewsCan we develop a 100% Javascript/HTML/CSS web application without backend?
I am a developer backend Java and always used Javascript on frontend for the purpose of giving dynamism and better interaction to HTML pages (I have always developed corporate systems). Is there any…
-
4
votes1
answer882
viewsHow 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 question is, in the video it puts a code at the top of the file. import fs from 'fs' But when I put…
-
4
votes9
answers15601
views'nodemon' is not recognized
After nodemon installation I get the following error : 'nodemon' is not recognized as an internal command or external, a operable program or a batch file. The following commands have been passed:…
-
4
votes2
answers1212
viewsCheck out of Base64?
I’m making an email application (Hapijs) and found that some emails have his text encoded for Base64, but others do not. In this application I will need to receive emails from all services (Gmail,…
-
4
votes1
answer398
viewsLooking for Keywords in Elasticsearch
I’m registering some objects of the kind: [{ nome: "bom_atendimento", chaves: ["bem atendido", "atendimento bom"] }, { nome: "ruim_atendimento", chaves: ["pessimo atendimento", "atendimento ruim"]…
-
4
votes2
answers182
viewsIs it necessary to have Node.js installed to run software with Electron?
For a user to run a .exe of a software made in Electron, it needs to have Node.js urged?
-
4
votes2
answers5329
viewsThe difference between req.params and req.query
I’m having a question about url parameters. Is the following, I know there’s a way I can rescue a parameter this way users/:id, Then I pick up with the req.params.id, but I saw a video that the guy…
node.jsasked 4 years, 10 months ago Edgar Silva 53 -
4
votes1
answer134
viewsPass a method on all routes of all http methods except two
Basically I want to make all the routes that come from any http method (get, post, put, ...) pass, first, by a method that will make the verification if the user is authenticated, however, this…
-
4
votes2
answers279
viewsHow to divide strings into equal parts
How to divide a texto with or more than 20,000 characters in equal parts and each part containing 5000 characters? (Nodejs) I have that function: textBreak = (data) => { const characterCounter =…
-
4
votes2
answers613
viewsNodejs - Mysql Error: Too Many Connections
I recently made a refactor of my code to adopt the MVC standard, because it was very disorganized! However, an error called "Too Many Connections" started to appear. This error causes my Node-mysql…
-
4
votes2
answers2885
viewsRetry Case Gives Timeout with Axios
Eae guys, I have a little problem to give a Retry in a POST using Next case exceeds Timeout. I’m trying to implement this(https://github.com/softonic/axios-retry) library next to Axios, but it…
-
4
votes1
answer53
viewsHow to access the "this" of a class with an external function?
I want to create a function within a class that is defined externally, but I can’t access the this class. Example: class minhaClasse { constructor(objeto){ this.meuNumero = objeto.meuNumero…
-
4
votes1
answer115
viewsHow to type keys (Keys) of objects nested in Typescript?
I need that guy ColumnDefinitionType accept the object keys IUser, as well as accept the keys of objects nested to the IUser. export interface IUser { userId: number; username: string; name: string;…
-
4
votes1
answer73
viewsWhat is the purpose of the Promises Timers API on Node.js?
Recently, in the version V16.0.0 of Node.js, added the Promises Timers API, and from what I understand, it’s about alter the behavior of standard timers (setTimeout, setImmediate, etc...). These…
-
4
votes0
answers38
viewsIs there a more correct way to handle redirects in authentication streams? (e.g., HTTP Status 302, or Javascript, or auto-Ubmit form)
I work on a project where we have a Frontend application and a second Backend application (Nodejs) that takes care of authentication and contains a REST API. In the authentication part, Backend…
-
3
votes3
answers633
viewsProblem to use Gulp
Look at this, I’m starting to use the Gulp started a project on my work computer and everything worked correctly (Elementary OS). Now at home the Gulp does not work well (also Elementary OS). When I…
node.jsasked 10 years, 4 months ago Luís Henrique Faria 582 -
3
votes1
answer990
viewsGenerate securely random string in Nodejs
How, using the Javascript language on the Nodejs platform, generate a string, preferably with configurable size, random enough to be used in routines dealing with cryptography and that for safety…
-
3
votes1
answer97
viewsProblem with Phonegap installation
I’m away from home and need to keep my projects up to date, I bought a very simple notebook for my trip, and in the installation of Phonegap this giving an unusual error in my opinion because I had…
-
3
votes1
answer4437
viewsIntegrate nodejs application to php site on separate servers?
How can I integrate an chat hosted in Heroku to my PHP project on another server? The application is simple and does not use database, the idea would be that in PHP when doing login automatically in…
-
3
votes1
answer768
viewsIt is possible to create image thumbnails with pure Node.js
Well I found a library, which is great for image manipulation, and it works perfectly, in case the Graphicsmagick for Node.js, but there is a problem, because there are dependencies of other…
-
3
votes1
answer228
viewsHow to deploy without changing the contents of a folder on the server?
I’m new to the Nodejs and Git world, I’m trying to develop from a system where users upload images. Every time I do deploy from the app, users pictures are deleted from folder public/uploads/ How…
-
3
votes1
answer878
viewsListing all the files in my application
I want to back up my application and send it to my Bucket on S3. But for that, I need to first list the directories (along with the files), and then upload to S3. I found this tutorial but it…
-
3
votes1
answer2876
viewsProblem installing Bower in windows
I installed the nodejs without problems. I ran this command and it was: npm -v 1.4.28 Right after I try to install Bower and I can’t: npm install -g bower After running this command appears this: I…
-
3
votes1
answer1030
viewsNode.js and PHP on the same server
I have a dedicated Centos 6.5 server with Plesk Panel 12 installed, with multiple sites in php. I would like to develop a chat with Node.js and integrate it with some sites made in php. Except that…
-
3
votes2
answers2832
viewsURL with string parameters with angular.js
I would like to know how to best treat url with parameters string angular.js. When accessed: www.app.net/nomeDaPessoa/ServicoDaPessoa Would respond to a certain route that is receiving the…
-
3
votes1
answer507
viewsClear Document write
I’m trying to collect the time through a server where I run the following app, only that the problem is that when I do the res.write it repeats, there is some way to clear the screen to generate a…
-
3
votes1
answer284
viewsHow to inherit methods from one prototype to another using the Node.js usel module?
I was watching the video of a guy explaining events of Node.js and at the end he makes a small module using util.inherit to inherit from one prototype constructor to another. Although I know the…
-
3
votes1
answer488
viewsCreate constants correctly with Mean.js (Node js)
I’m starting to study Mean.js and I was in doubt when the best way to create my application constants. I need to store some constants in the project to be accessible in various parts of the code.…
-
3
votes1
answer1004
viewsCapture value of an asynchronous function in Nodejs
Hello, I have a problem I haven’t found a solution. I have an array of values, in which I scan and for each value run function that makes a request to dynamodb and returns a JSON. This request is…
-
3
votes2
answers87
viewsNodejs/Phonegap/Cordova tablet
I share 3G mobile phone with my android tablet when I’m on the bus. Here comes the question: I wonder if there is the possibility of using the development environment of Nodejs/ Phonegap/ Cordova to…
-
3
votes1
answer2885
viewsI can’t create project using Express Node.js
I’m following a tutorial from Node.js and I’m learning about frameworks, but when I try to install the express by cmd error, I’m trying to do it this way: express aplicativo1 And the error that…
node.jsasked 8 years, 12 months ago DiegoAugusto 8,694 -
3
votes2
answers403
viewsCommunication between C C++ ADDON and Nodejs
They are trying to implement a speech recognition server. But this last part has to be implemented through a C C++ Addon. Currently, I am saving the wav file to the server and passing the name to…
-
3
votes2
answers896
viewsBlock Save Repeated Data
As I check in the controller, if there is already an email registered in the bank Mongoose and so, lock save it again?
-
3
votes1
answer5437
viewsDifference between Multi and Single Thread
In terms of processes, what is the difference between the multi-thread pro single-thread? How the two forms will work with a requisition?
-
3
votes1
answer350
viewsThread in Java and Nodejs
We know that benchmarks are specific measures and do not count for all cases, certainly what and how you measure matters a lot, so I will try to be very specific. In the case of a server having…
-
3
votes2
answers451
viewsNodejs - Token authentication?
I’m following a few examples here about authentication on and it’s working normal, but I’d like to know if passing the token through the URL would really be the right shape or if there’s any method…
-
3
votes1
answer177
viewsBroadcast via an Express route
I have an endpoint in a Node application that when called should trigger a broadcast for the connected users in the Node application. That is, as soon as the user entered the system he would connect…
-
3
votes2
answers46
viewsDoubt with syntax
Simple doubt. Usually I see this syntax: require('../lib/dbconnect')(config); But I don’t understand why I use those parentheses like that (....)(....); Can someone explain to me what this is all…
-
3
votes1
answer146
viewsHow to format money with jade in Node.js?
I have to present monetary values in my view, but it is appearing without formatting. For example, 5.4237 should be presented as R$ 5,42, but I don’t know how to format this value using the Jade…
-
3
votes1
answer380
viewsNodejs socket client - callback for each request
I have the following code var net = require('net'); var client = new net.Socket(); client.connect(1337, '127.0.0.1', function() { console.log('Connected'); client.write('Hello, server! Love,…
-
3
votes1
answer3127
viewsHow to find the Expressjs version?
How do I find the installed version of Expressjs?
-
3
votes0
answers329
viewsSend Email + Digital Certificate with Node
I need to send emails signed with digital certificate with Node. Can someone give me a direction of how to implement this?
-
3
votes1
answer181
viewsAuthentication / Permissions with MEAN Stack
I’m studying the MEAN stack, I’m really enjoying it, and I’m developing simple applications, but I couldn’t find something that would really help me understand better about authentication and…