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
-
-2
votes1
answer48
viewsProblems with Nodejs on Linux
I have a problem, I’ve tried several ways and nothing. I’m taking a JS course, and in one of the classes the teacher used the Math library... only my result is always Nan. So researching I found…
-
-2
votes2
answers69
viewsHow to handle data passed by Answer in jQuery
Just after making a render of a screen as in the example below: ( return res.status(200).render("mschedule", { erro: {}, list: teste }) ) I would like to manipulate a return data (list) in jquery.…
-
-2
votes1
answer2232
viewsHow do I use EJS with javascript?
I need to pass a content coming from Mongodb’s Collection to my mandatory google maps api function. How would this code go down the right way with EJS + NODEJS + MONGODB? I need to pass an array of…
-
-2
votes1
answer96
viewsNode.js with Vue.js
Node and vuejs can complement each other ? It is normal to use vuejs, Node.js and espressJS together ? In my view are 3 different frameworks, but it makes sense to use them together ?
-
-2
votes1
answer116
viewsSocket io cannot find the route
all right? I am instantiating the socket as IO and when using io.on('Connection', Function()) it ends up not falling inside my io.on when accessing the page, it does not return any messages and in…
javascript node.js socket websocket socket.ioasked 4 years, 9 months ago Henrique Noronha Favorette 51 -
-2
votes1
answer572
viewsCalling another file function, NODE
Good afternoon, I would like to know how to pull the function of a mini-program to a program in JS, check Note.js containing the function verificaNota, I would like to know how to pull this function…
-
-2
votes1
answer25
viewsCreate if Findoneupdate does not find anything
Hello, I am developing an application in Node.js and I am having difficulty. In case my findOneUpdate doesn’t find anything I wanted a create to be done, but I couldn’t find a way to create an if or…
-
-2
votes1
answer73
viewsCreate object containing only some attributes of another
Is there any possibility of creating an object with only a few attributes of another? In Adonis, it is possible to filter which exact fields to pick from one request object and already create…
-
-2
votes1
answer683
viewsAPK Ionic 3 Does not install
Good morning Galéra I’m having a problem, I can generate the apk with Ionic normally, but when installing on the phone, a message appears from the play store and says that it does not know the…
-
-2
votes1
answer92
viewsEslint problem in Reactjs with useEffect, in this case how do I not need to put the // Eslint-disable-line
Well, folks, I have a function that allows for some variables within it. However, it should only be executed when a dependency specific to it is changed. in the case of index useEffect(() => {…
-
-2
votes1
answer113
views -
-2
votes1
answer24
viewsIs it possible to add a view with express-Enerator?
I would like to understand if after the creation of a project structure with express -v pug -c sass projectoName, it is possible to add some view or partial, to be using as header or footer. In…
-
-2
votes1
answer79
viewsJSON Spacing Key, "." and Main Letter
Hello people, I would like to know how I can get the values of HP, Sp. Attack and Sp. Defense in Javascript?? the values below work but the quoted ones do not =[…
-
-2
votes2
answers83
viewsList to frontend values of multiple tables
Good afternoon, I am a beginner in Act and Noode.js and I have a problem. I have a table on a web page where you’ll receive the data from a trip. The columns (Id localities, name, date, time) are…
-
-2
votes1
answer29
viewsHow can I make the user type a positive integer and display the sum of their example digits : 505 = 5+0+5 =10
Let soma Let num1 num1 = prompt("Enter a positive number") if(num1 < 0){ console.log("Error you tried to make a negative number account") } Else if (num1 > 0){ }
-
-2
votes3
answers639
viewsHow to stop the execution of a code in the nodemon?
Qd I want to run something using the nodemon I type in the terminal nodemon nomeDoArquivo.js, blz, but and qd I want to stop the execution? Pq qd is a code tp timer for example, the run does not…
-
-2
votes1
answer201
viewsHow do I count records after a specific date in Sequelize?
I am creating an API in Nodejs using Sequelize to facilitate the manipulation of data from a Mysql database. I have a list of appointments and I need to count how many appointments a patient has…
-
-2
votes1
answer366
viewsOperating a delete operator needs to be optional
I set up a Node server, and when I went to do the tests to get up to production I saw that Eslint was accusing me of an error: Just for the record, it’s working as due, delete is removing the…
-
-2
votes1
answer22
viewsActions On Google does not persist data from conv.user.params
When creating an Action for Google Assistant, in Backend (Webhook Fulfillment) I am using conv.user.params (User Storage) to store user data (as it is in the documentation). A simple example of use…
-
-2
votes5
answers2360
viewsTypescript error Property 'user' does not exist on type 'Request<Paramsdictionary, any, any, Parsedqs>'
How can I fix the error Property 'user' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs> I created a @types folder at the root, inside it had a file express.d.ts with the…
-
-2
votes1
answer3904
viewsCannot find module
I’m following this tutorial to create a chatbot from the link below, and giving this error, can anyone help me with the error? the error is in the file server.js or in dialogflow.js? dialogflow.js…
-
-2
votes1
answer1010
viewsNODE.js Insert in MS SQL
I am trying to run an INSERT in my MSSQL through my NODE.js server But it’s not working. I believe it is not a connection problem because (as I will demonstrate at the end of the post) I made a…
-
-2
votes1
answer55
viewsHow do I "capture" the full route of an http call with express router?
I’m using the express.router nesting my route into several "router.use()". It is possible to take the final route via console? ex: const routes = Router(); const v1Router = Router(); const…
-
-2
votes1
answer75
viewsReplace PHP with Javascript and Node JS
It is possible to program the web completely without PHP, using Javascript and Node JS? Beyond Html and clear CSS;
-
-2
votes2
answers32
viewsRETURN VALUE TYPED WITH JAVASCRIPT
Hello, I needed a help. The idea in Javascript is as follows... The user type a value in a input, and the application returns the value corresponding to this type value, which has already been…
-
-2
votes1
answer51
viewsConditional API in Java Script
I’m new to Nodejs with Javascript, I got a ready example and I just want to add a condition in the body of the API type: If that value exists it shows the message in the API call via Insonmia or…
-
-2
votes0
answers35
viewsUpload files to Node.js using multer
I’m using multer to upload files to my backend. However, I am in a situation where I need to upload several files along with other data to a form, however each file may contain an associated…
-
-2
votes1
answer63
viewsPromise Javascript wixsite
I’m getting javascript about 3 days ago so I’m very lay, I know java and c# a little. I’m making a Wix site using their own backend which is in js. From what I understand js runs the code…
-
-2
votes0
answers14
viewsHow to make Puppeteer work in headless; true mode
I’m trying to get the innerText 3-element page.$$('selector') but it doesn’t work if I leave the headless: true I’ve tried using page.evaluate(()=>{ const elems =…
-
-2
votes0
answers24
viewsstring outside the console.log is not recognized
Because _message.content.toString() outside the log console is not being recognized as a string If I put name = 'string' it brings the search result if I use _message.content.toString() it comes…
-
-2
votes0
answers7
viewsHow can I convert QUERY to TYPEORM functions
TABLE subjects id, course_id, Subject, subject_name, created_at TABLE Ourses id, source, name, info, created_at I have this function that searches the following fields .query(`SELECT subjects.id,…
-
-2
votes0
answers19
viewsWindows does not recognize npm commands
Every time I use an npm command opens a window asking you to select the program to read the file, I have tried to reinstall Node, change the environment variable and nothing worked. Does anyone know…
-
-2
votes0
answers10
viewsPeople with a project here of a site no longer able to open the interface of it, I’ve put the dependencies inside the Node more not yet run
Already put the command npm run serves more speech than error, dependencies already loaded more interface not opened yet.
-
-2
votes1
answer108
viewsProblem with result Undefined - nodejs
I am having problem to recover the data from db SQL Server with Node the same does not pull in any way the result of the query informed: module mssql dbConnectio const sql = require('mssql'); const…
-
-2
votes1
answer197
viewsServer does not update page after dynamic change
I generate a page through: app.get('/conteudo', (req, res) => { res.send(conteudojson); }). Dynamically, the conteudojson is amended and listed again the "/content": app.get('/conteudo', (req,…
-
-2
votes1
answer144
viewsDoubt regarding Nodejs and Mongoose
Hello I started to study nodejs and I have a question regarding connections with database and relationships, Using Mongoose I made this schema: const mongoose = require('mongoose'); const…
node.jsasked 4 years, 10 months ago Joao Spirit 101 -
-2
votes1
answer126
viewsHow to Calculate Interest on a JS Node API?
I created a function that takes a value and adds 10% on top of the value. The question is: I want that if the user enters a value equal to or less than 100 it adds 10%. Now if the value is greater…
node.jsasked 4 years, 8 months ago Sena Oliveira 364 -
-2
votes1
answer62
viewsREFERENCE ERROR html and Node.js
var express = require('express'); var router = express.Router(); var pessoas = []; /* GET home page. */ router.get('/', function(request, response, next) { response.render('index', { title: 'Node.js…
-
-2
votes1
answer451
viewsMVC Web Standard with Nodejs
Guys, I’m not finding anything related, it’s as follows: I’m learning the MVC model, using the Express module (Nodejs), connection with Mysql Ok and already have a little interaction between the…
-
-2
votes1
answer206
viewsInitialize a Node.js server and connect to MS SQL
I’m starting to use Node.js and developing web applications, I believe this is a very basic doubt, but I found nowhere a solution to my problem. I need to connect my . js with MS SQL, found the…
-
-2
votes1
answer806
viewsReturning the result of a query to the external API with Adonisjs
I am consuming an external API with Request in an application made with adonisjs, to request is done normally and is returning the statusCode and body but I cannot return to my API. I want to return…
-
-2
votes1
answer44
viewsNodejs Select database when logging in
Hello, good afternoon. I’m dealing with a project that will work as a service, the client has some knowledge in IT and requested that users can select the database when logging in, for example: On…
-
-2
votes2
answers1139
viewsUnhandledpromiserejectionwarning - Registration Error with Mongodb and Node.js
I’m trying to register users on Mongodb. The environment is windws 8.1 and I am also using Mongoose, express and Xios in the backend and Insomnia to test the registration. When I try to register…
-
-2
votes2
answers635
viewsUnhandledpromiserejectionwarning: Sequelizeforeignkeyconstrainterror
insert or update on table "appointments" violates foreign key constraint "appointments_user_id_fkey" I have this error in Nodejs when trying to create a new table that has foreign key in Migration,…
-
-2
votes1
answer888
viewsError trying to post on Mongodb with Insomnia
Hello, I am trying to insert a data in the database (Mongodb)using the POST type, I am using Insomnia to perform the inserts tests but when I try I get a return of errors by the nodejs terminal, as…
-
-2
votes1
answer58
viewsAPI get/put error
Hello, everybody! I am studying nodejs and React. I built a little project that performs a crud with Mysql database. The project is to show and edit employees(employees) of a company. I can register…
-
-2
votes1
answer102
viewsLIKE for timestampz sequelize
I am trying to filter the activities by date but the field is timestampz. The bank I am using is the postgres { "name": "SequelizeDatabaseError", "parent": { "name": "error", "length": 220,…
javascript node.js query sequelize-js operator-likeasked 4 years, 4 months ago Gabriel Guizardi Cardoso 1 -
-2
votes1
answer360
viewsSequelize error when performing BD registration [Model.hasMany called with Something that’s not a subclass of Sequelize.Model]
I’m doing a Ode project, using sequelize as ORM. I have 4 tables relating [Factor, Subfactor, Obs_factor, Goals], when I will run the create of this error: Error: Factor.hasMany called with…
javascript node.js postgresql relational-model sequelize-jsasked 4 years, 3 months ago Tarcisio pieroni 3 -
-2
votes1
answer22
viewsExport query Node.js to HTML
I’m starting in Node.js and I did a Crud, and I’m trying to return a query to my homepage, but I couldn’t find documentation to save this Count and take it there. (I preferred not to use the…
node.jsasked 4 years, 3 months ago Rafael Silva 1 -
-2
votes2
answers151
viewsAxios Node Put with authentication does not access
I made an Node application (v12.14.1) to access a webservice. It has Basic Authentication. const uname = "xxxxxxxxx"; const pass = "%$7675845353525$%"; const p_cpf = "97856353424"; const p_senha =…