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
votes0
answers77
viewsSharing routes on express
I’m trying to make a generic controller that will provide the basic crud routes, the idea is to extend this controller and be able to add some custom routes that are only inherent in that class.…
-
1
votes0
answers187
viewsCitizen Card in Node
Good staff Has anyone tried or managed to run the citizen card with the Node? I couldn’t get it to work even after I installed the middleware...…
-
1
votes0
answers53
viewsIonic - build is giving error
when I’m building with the code: ionic cordova build --release android is making that mistake: What is the Solution ??…
-
1
votes1
answer314
viewsHow to join audio files with Node js
I need to concatenate 2 audio files in wav format with Node. I have 5-second "audio 1" and "5-second audio 2" I need to generate the file "audio 3" 5 seconds long, which contains the contents of…
-
1
votes1
answer4206
viewsError while running npm start
I did the installation of Node.js following the instructions of the Ionic site, the installation occurred normally but when I try to give the command "npm start" caught this error, it tells me that…
-
1
votes1
answer219
viewsremove attribute from a node in Nexxmldocument in DELPHI
I created an XML Document when creating the 2nd. Node 'Header' comes with the attribute from the previous Node. The Node is created as <Header xmlns=""> how can I remove xmlns="" from Node I…
-
1
votes1
answer34
viewsapp.set('x-powered-by', false) does not work on expressjs
Hello, in my main code of my app, with the use of express, I’m trying to remove the "x-powered-by" header, and I’ve used so much app.disable("x-powered-by") how much app.set("x-powered-by", false)…
-
1
votes0
answers212
viewsReturn a variable (Singleton) using Node that depends on Promise
Good afternoon, you guys, It has to create a variable in Nodejs/JS where I would return a value only to be used several times throughout the program? Exemplifying my problem: I have to log on to a…
-
1
votes1
answer34
viewsI’m having a problem researching objects inside objects
I download a JSON file, by example, saved and then open (all this by javascript), and want to access the Property 'Has_infobox_html', I tried to use the following loop var poeItem = new function() {…
-
1
votes1
answer566
viewsDecrypt sha512
Is it possible to decrypt sha512? If you do have a website with the algorithm or a Node package that you can tell me about?
-
1
votes0
answers585
viewsnpm does not install dependencies and is apparently locked
When trying to install any dependency is not working, when searching about this some people said that the reason is the npm do not find the folder for installation, but I changed the prefix on…
-
1
votes1
answer2620
viewsHow to check if file exists (asynchronous)
In Node.JS, I use this method of fs to check if a file exists: const fs = require('fs'); // [...] if (fs.existsSync(path)) { /** Do stuff. */ } The question is, how can I do the same thing, but in a…
-
1
votes0
answers62
viewsServe custom . js file in Express route
I have a specific "home" page for authenticated user that is served by a router however this authentication is made via cookie if there is this cookie "session" (created after user login and set…
-
1
votes0
answers304
viewsWeb service access with SOAP Headers and Node.js
I am trying to access a webservice using Node.js (with module Node-Soap) and that first I need to login and then in the calls of other methods it is necessary to send the received Header on login. I…
-
1
votes0
answers1093
viewsSession at Node.JS
I was reading that the middleware Express Session it is not ideal to work in production, because it archives the sessions in memory. I also read that storing session data in memory is not a good…
-
1
votes2
answers1099
viewsInclude or Require in Nodejs to separate codes
Hello! I wonder if in nodejs it is possible to separate some codes in different files as this example below, and how to do this: Currently I have only one file this way: File 111.js var app =…
-
1
votes1
answer2316
viewsCRUD Mysql with Nodejs: how to use Pool correctly?
I created two file to test the use of Mysql with Nodejs as follows below, but I’m finding the answer a little slow and I think I’m doing something wrong: DOUBTS: 1) Is this the most correct way to…
-
1
votes0
answers44
viewsChanges have no effect when I change Schema, using mongodb and nodejs
Every time I make a change in my Schema I have to restart my server. I’m using the nodemon, but it doesn’t always update, someone has been through it? module.exports = function(app){ var Schema =…
-
1
votes0
answers156
viewsUse windows text and speech converter voices in javascript and nodejs
Does anyone know how to use the text converter and speak windows in javascript or js Node? has to be windows necessarily ..
-
1
votes1
answer1943
viewsHow to print a table-shaped array in nodejs on the console?
How do I get the same output from this matrix, written in Java, on Nodejs? public class Matriz { public static void main(String[] args) { int[][] m = new int[4][4]; for (int i = 0; i < m.length ;…
-
1
votes2
answers648
viewsError Including Image in App
I created a default project, includes some images . png in the project in the main folder: Project - image.png - index.android.js - ..... When running run-android an error is displayed indicating…
-
1
votes1
answer589
viewsHow to receive an array in the body of a nodejs route
Good morning, guys. I’m having a really hard time. I started a week ago studying in nodejs, so I’m well. I have a code that returns an object in json format to me and I would like to create a page…
-
1
votes1
answer1079
viewsRemove duplicated string characters if not a graph
How to remove duplicate characters in a string if it is not a graph (rr, ss) using Regex? Ex: Oiiiii => Hi Aloooo => Alo Past => Past Car => Car If the rr or ss appear at the beginning…
-
1
votes0
answers90
viewsAsynchronous nature of nodejs, loop for com querie mysql
Inside an upload route in the nodejs I have it: router.post('/uploads',function(req,res){ //Omitido algumas instruções para melhorar o entendimento. InsereMidia = function(midia){…
-
1
votes1
answer854
viewsTimers on Node.js: their differences and their relationship to process.nextTick
What’s the difference between setInterval, setTimeout and setImmediate in Node.js? I know that setTimeout creates a single timer, such as a delay, and the setInterval creates a gap. But…
-
1
votes1
answer79
viewsMultiple users on my Nodejs server accessing the same variable
I’m having a question about how a nodejs server works with multiple users. To contextualize: Say I create a server-side variable, the value of that variable will be overwritten if someone else also…
-
1
votes1
answer3134
viewsWhich password encryption should I use with Node.js? which one is more secure?
I am taking a course of Node.js and in this the tutor uses md5 to encrypt the password.. more read in some articles that md5 ñ is very safe.. which is the most recommended to use with Node.js? Thank…
-
1
votes0
answers47
viewsCapture values followed by a textarea in the same function
I’m developing a console with HTML5 + Vue to streamline some simple commands. The inserted command comes through a textarea with v-model="cmd" v-on:keyup.enter="consoleMode()". I’m using Else if…
-
1
votes0
answers369
viewsHow to get the return of an sql query using nodejs
Good afternoon, I’m venturing into nodejs and I’m doing some pranks and I’m having a hard time getting the return of an sql query. I found some examples on the internet and even work (the result is…
-
1
votes0
answers42
viewsUpload preview in modal
I was previewing through another tab: public visualizarArquivo(file): void { var url = window.URL.createObjectURL(file); var a = document.createElement("a"); a.setAttribute("href", url);…
-
1
votes0
answers343
viewsHow do I change input type="file" path and send form with another image?
I need to upload several images that are within my application. My form is this: <form id="uploadForm" enctype="multipart/form-data"> <div class="file-field input-field offset-s4">…
-
1
votes0
answers68
viewsDoubt Socket.io Push Notification
Hello, I have an application made with Node.js and socket.io that sends a push notification when the.html client page is open. my question is: How to send and receive notification even if the.html…
-
1
votes1
answer644
viewsObject.<Anonymous> (Express + Middleware)
> > node index.js C:\Users\cpsep\Projetos\nodejs\semparar\node_modules\express\lib\express.js:107 > throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express…
-
1
votes1
answer2316
viewsWhat is the function of the.Switch app in Express?
I recently started my studies in Nodejs and Express. From what I’ve been reading, app.Leann is basically what makes the server listen to requests coming from the defined port. But I could notice…
-
1
votes1
answer34
viewsHow do you declare date on Node Express?
I’m with the following entity; 'use strict' var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ReviewsSchema = Schema({ name: String, date: String, rating: String, comments:…
-
1
votes2
answers7102
viewsTypeerror: Extractjwt.fromAuthHeader is not a Function
I’m having some problems with Passaport.js. When I try to run my api, the terminal returns an error. I went to the file in question and found nothing wrong. I did a web search, but the solutions I…
-
1
votes1
answer4180
viewsImport functions from another file (Node.js)
I have a bot.js file that would be my "main" project and inside the same folder where the bot.js is.I have Call.js and Somar.js which are just functions [call()] and [add()]. It would be possible to…
-
1
votes0
answers68
viewsDecrypt IMAP email?
I am receiving emails in my application through IMAP, and everything is appearing in the right way except the text that is encrypted, how do I decrypt or set up so it is not encrypted?? I’m using…
-
1
votes1
answer181
viewsAdonisjs - Generate code from database already created
I have a question. I’d like to know if it’s possible. I have a Mysql server already running a model of mine, with tables already created and their due fields. Have some way to connect a Node…
-
1
votes1
answer14539
viewsnpm ERR! Missing script: start
I have this error when trying to start Vue-cli. The installation ran smoothly: villas:vue villas$ npm start npm ERR! missing script: start npm ERR! A complete log of this run can be found in: npm…
-
1
votes1
answer594
viewsRedirect after receiving Replay from server?
I have an application that the front end is Vuejs/Quasar and the server is hapiJS. I am working on the login part and would like to know how to redirect the page after receiving confirmation from…
-
1
votes1
answer162
viewsMaintain req.body parameters when changing course
Hello, my question is this:: I am using Express/bodyParser and Nunjucks. I submitted a form with the method POST from my root route '/'. In the form I have two dice: Username Date of birth In the…
-
1
votes0
answers110
viewsEnvironment Preparation Android Cordova
Following the tutorial in this video https://www.youtube.com/watch?v=4sYLBVGwxrw Posted by Marcelo Costa, I performed all installations as recommended. I’m using Windows 10. I installed Android…
-
1
votes0
answers61
viewsPost Error - Payload (Node.js)
Today when I went to perform the post of a larger base 64 is returning it from my server. When uploading a smaller image it sends smoothly, I tried using some solutions limiting the server to 50mb…
-
1
votes1
answer287
viewsTAKE DATA FROM FORM JS
So I wanted to do the following has a form which has several input fields, so I wanted to do the following loop or something similar to get the values of the fields using jquery or js (pure). I’d…
-
1
votes0
answers39
viewsSend a blob to a webservice
Hello, it may sound like Jr. the personal question but I’ve tried searching the internet and nothing. I have the following scenario: A. NET API provided by a company to which I have to submit a…
node.js asp.net-web-api file-upload integration couchdbasked 6 years, 2 months ago Hiago Souza 5,837 -
1
votes1
answer377
viewsCan’t set headers after they are sent - Nodejs
I am creating a user registration system in Nodejs and I need to check if the email entered is already registered, everything is working normally, if I type an existing email it returns the id of…
-
1
votes1
answer445
viewsReturn Javascript script with Node.JS
Using Node.JS I want to read a Javascript script in a folder and return it. It turns out that when I access the file through the browser, the code appears normally. But the script is not embedded in…
-
1
votes1
answer1167
viewsFilter with Node.JS
I have a list of items saved in a Mongo collection, I would like to know how to filter the original array. Follows the code api.filtra = function (req, res) { model.find() .then(function(itens) {…
-
1
votes1
answer1170
viewsRemove aquifers with File System
I am trying to remove two aquivos from my server with the following code: const fs = require('fs'); const express = require('express'); const app = express(); app.delete('/delete', function(req,…