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
-
5
votes1
answer1150
viewsWhat is the difference between findByIdAndRemove and findByIdAndDelete in Mongoose?
I’m looking for the difference between the two and I can’t find it. They’re synonymous?…
-
5
votes2
answers99
viewsRequire function with another associated function?
In a simple chat project, which I have already used and works 100%, it is used const express =require('express');//para http const app = express();//instancia const http = require…
-
5
votes1
answer260
viewsWhat is Headless Browser?
I am creating a program to compare prices in Nodejs, and in my researches I came across this term, what would be Headless Browser and how it works?
-
5
votes1
answer34
viewsHow to provide module configuration correctly?
I’m creating a module of Node.js and wanted to provide usage settings. Let’s say I wanted to provide a prefix for the console.log just as an example: let opcoes = {}; function imprimir(texto) {…
-
5
votes1
answer500
viewsWhat is npm @types and how do they work?
I’m starting a project with NodeJS and TypeScript and the instructor told to install the @types/node, beyond the npm package TypeScript. He quickly quoted that the @types/node creates types in the…
-
5
votes3
answers125
viewsAsync Function javascript
I am making an API in Node.js and I have a function I call through the post, but before forwarding to the precise repository I run the function getProduto(idProd, produto), but is doing the…
-
5
votes1
answer462
viewsSchema modularization using Adonisjs and Graphql
I have a project where I am using Adonisjs and Graphql, I created the schema and defined the darlings, mutations, types. But everything was centered on just one file, so I decided to modularize the…
-
5
votes1
answer4672
viewsHow to use SQL "LIKE" in Sequelize?
I am developing using sequelize but as it is my first time using this ORM I am with some doubts. I have the code below to make a query in the database through an input type text but I am using the…
-
5
votes1
answer393
viewsawait does not await execution of the President
I thought I understood how asynchronous function works with await. In my understanding the await was waiting for the resolve of Promise to continue to the following. To test this operation, I…
-
5
votes1
answer224
viewsIs it possible to start serverless-offline by Javascript?
The plugin serverless-offline is used to start a framework-based application Serverless. To start, the command is used serverless offline [options] or sls offline [options] Is it possible to start…
-
5
votes1
answer126
views(NODE) What good is a processor with multiple nuclei if Nodejs only runs on one thread?
Example: If I want to set up a server, then I have to "worry" about the clock and not the amounts of nuclei ? Like, if I have two processors to buy X-Processor -> 8 2.0GHz Nucleus &&…
-
4
votes2
answers7390
viewsHow to save JSON file with Node.js
I want to make a website to test some things. The site is running on my home server done with Wamp. I was told that I could make a small database using JSON files. I have a JSON file in the website…
-
4
votes3
answers1621
viewsIs it possible to move Nodejs modules to be used offline?
I use the GruntJS for personal projects, I would like to use the benefits of this tool at work, but the use of the network is limited and I cannot install via prompt. I tried to copy the directory…
-
4
votes3
answers2718
viewsJavascript/Nodejs setInterval with programmed start, simple cron style
For Javascript and Nodejs, there are n robust Cron style libraries, such as Node-cron. But they are complex too much for simple situations, are heavy to download in the browser or require an…
-
4
votes1
answer702
viewsHow to find the server port that answered the request
I’m using the http-proxy to create a load Speak in Nodejs, this module has the event proxy.on('proxyRes', function (res) { .. }); Within this event, I would like to grab the server port that…
-
4
votes1
answer2484
viewsDefault prompt opening directory in Node.js
How do I make Node.js always open in a directory that I want? I’m new to this technology. I wanted to know how to change the standard path opening, because currently it always opens in…
-
4
votes2
answers888
viewsAre there BI/OLAP tools for the MEAN.JS platform?
Someone can indicate me a BI/ OLAP framework or at least a Chart Engine, preferably open-source, that integrates properly the platform MEAN.JS or MEAN IO architecturally SPA - Single Page…
angularjs node.js mongodb express business-intelligenceasked 9 years, 8 months ago Fernando Santucci 161 -
4
votes1
answer287
viewsData stream with socket.io
Hello I am doing database data stream this way below, sé que esta sobrecarregadno muito o navegador do client, teria outra forma de stream sem ocorrer essa sobre carga? var express =…
-
4
votes1
answer789
viewsHow do HTTP request?
I would like to make an HTTP request to my college server by mimicking the requests sent by the browser so I can log in and check my notes. I already have experience with mobile development, my…
-
4
votes1
answer663
viewsProblems installing the Ionic Framework
I am beginner with the framework Ionic and I’m having a problem trying to do the installation. Recently I had to format my computer and now I am not able to install the framework again. When I run…
-
4
votes1
answer421
viewsChange field Unique Collection mongodb
Good morning, I have a Collection in the mongodb with a field unique:true. I would like to change this field to false. If I change the code and delete all Collection works, but if I make the change…
-
4
votes3
answers1030
viewsSearch Mongodb Array
I have these two documents in the Mongo: /* 0 */ { "_id" : ObjectId("54f395ef7a5a5ea37af77398"), "HISTORICO" : [], "MOTIVO" : "", "RP_CANCELAMENTO" : "", "DATA_CANCELAMENTO" : null, "RP_FINALIZACAO"…
-
4
votes1
answer136
viewssynchronize two screens
I am starting to develop a scheduling system in Rails and I have the following problem: Let’s say I have two open screens in my book: 1.1 - First screen opens on doctor’s computer. 1.2 - Second…
-
4
votes1
answer40
viewsIn Jade, how can I suppress the error if a variable does not exist?
I’m trying to create a form to create a user, but I use the same form to edit. When I try to create a new user the app shows me an error because in the form fields it tries to get information from a…
-
4
votes2
answers335
viewsLibrary that reads text and turns into audio
I am looking for some way to implement in my system an automatic reading with audio. It would work like this: The user would ask a question (typing) and the little robot would bring the result and…
-
4
votes1
answer1254
viewsIDE/Text editors for Node.js
What are the best options of IDE or Text Editors for development in Nodejs? My need is to develop large projects with Javascript / Node.js, follows below some of the options I found. If possible…
-
4
votes1
answer1574
viewsHow to make a query with Node.js and Mysql
Hello, I’m starting with Node.js and MySQL, and I have some problems at the moment. Well, I have a table called users, and I need to request data for verification, for example: My site has a…
-
4
votes1
answer1642
viewsProblem with Session and Nodejs
I’m creating a chat with Node and Session, but I have the following problem: the user identifies and enters the room until then everything right. I am testing on 2 different computers. When I give a…
-
4
votes1
answer6257
viewsHow to see all modules installed in nodejs?
I’m taking a look at the nodejs and would like to know how do I list all the modules I installed. How can I do that?
node.jsasked 8 years, 6 months ago Wallace Maxters 102,340 -
4
votes1
answer526
viewsNode.js Sequelize Error Relationships
In this relationship, A Questionnaire can have MANY Questions, when I run it in return I don’t get the ID of Questionário on the table of Questão, but both are created. Why this occurs? Here’s the…
-
4
votes1
answer1070
viewsWhat is Node.js and what does it replace?
The node.js is what after all? He subsistitui who? Javascript? Serverside? Can anyone explain me better? I did not find these questions directly on the Web.…
-
4
votes1
answer1056
viewsAjax POST with jQuery and Node.js Express always returning 404: Not Found
I created the route below to accept POST requests, but calls via AJAX to this route are always returning error 404: Not Found. /* Arquivo: integracoes.js */ var express = require('express'); var…
-
4
votes1
answer1519
viewsNodejs route configuration using Express 4.8
I am using version v0.10.37 of Node and 4.8 of Express. I am trying to set the route to index. And the following errors appear Error: Route.get() requires callback functions but got a [Object…
-
4
votes2
answers617
viewsHow to identify a number (in full) in a sentence
I need a script to identify a number in a sentence. Ex: "Two Weeks ago" -> number = 2 It can even be by substitution even. So: if str contain two, replace("two", 2) Is there a module that can do…
-
4
votes1
answer228
viewsHow to compile the entire project folder for ES5 using Babel.js?
I have an HTML5 Cordova project and I need to hook before compiling to convert entire projects folder (www) to ES5 before compiling. It is possible? Structure cordova/ hooks/ node_modules/…
-
4
votes2
answers2461
viewsGenerate random password
Hello, I checked that there are libraries generate-password and password-Generator for random password generation. However, importing a library just for that, might not be a good idea. Is there any…
-
4
votes1
answer146
views -
4
votes1
answer706
viewsHow to create a module in npm?
The idea is to get this module down npm install and be able to run this package: npm install nome-do-modulo --save Once downloading could be run in my shape design below: nomeDoModulo =…
-
4
votes3
answers1358
viewsNodemailer sends email but recipient does not receive it (hostgator server)
I have an e-mail server at the hostgator and an account at the same. I need to use the nodemailer to send messages to my clients from this account. For this I need to configure manually with these…
-
4
votes2
answers3375
viewsIn Nodejs, the global variable in my app.js file is undefined in another file
I am in a project using Nodejs, and its Express framework. In the main archive app js. i call a function in order to read a file, and assign to a global variable: global.google_sheet_credentials =…
-
4
votes2
answers399
viewsUsing Node.js and PHP on the same server (Amazon EC2)
My site is made "totally" in PHP and I used Node.js for the real-time chat part. I’m using the services of AWS and I came up with a big question: I can install Node.js in the same PHP instance…
-
4
votes1
answer951
viewsHow to run different Node.js sites on the same server?
I have a Linux server and on this server I have several hosted websites, each with its folder and files. I want to start using Node.js to create the API’s for each site. What’s the best way to do…
-
4
votes2
answers141
viewsTypescript - Error: Debug Failure. False Expression:
I am trying to create a module definition Node.js. I have the file poolredis.ts, but when I add the line: import { RedisClient } from 'redis'; The Typescript compiler gives me the error: Error:…
-
4
votes1
answer3685
viewsFunction pipe() javascript (Node.js)
How does the javascript PIPE() work (Node.js)? I see it a lot in Gulp and would like to know how the function works directly in javascript.
-
4
votes1
answer928
viewsIs it possible to restart the Nodejs server when a modification occurs automatically?
Every time I try to make some modification in my file app.js I have to close and start the server for the modifications to take effect, would there be any way to automatically restart after a…
-
4
votes1
answer859
viewsError while removing accents
I have a javascript code to remove accents, it works with any accent, less with the crase, and the code should work with the crase as well. I can’t find the bug. var teste = "Çaptúra de Tela…
-
4
votes1
answer1553
viewsProblem with Vue-cli
Good afternoon, I did the global Vue-cli installation npm install -g Vue-cli When trying to start a project with the command Vue init webpack my-project the following error is shown Vue-cli…
-
4
votes1
answer155
viewsHow to check duplicate files?
How can I check if two files are equal, even if the name is different in a js application?
-
4
votes2
answers2344
viewsHow to print directly without opening the browser dialog box?
I am developing a web system where I need to print a label and a non tax receipt after sending a certain form. To perform this action, I have two printers: Matricial MP-20 MI Non Tax Printer - For…
-
4
votes5
answers3789
viewsNPM does not continue package installation
I’m trying to install a simple package with NPM, but the installation doesn’t start, always stops at the same place. C:\Users\Gabriel>npm install -g luaparse --verbose npm info it worked if it…