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
votes3
answers230
viewsExtract data separately from a date in string format
I have a date in string format: Wed Jul 20 2016 14:01:01 GMT-0300 (BRT) And I would like to extract the date and days and time in such a way that I can form a string like this: Quarta-Feira,…
-
2
votes1
answer141
viewsProblems with Request using superagent
I’m trying to accomplish a request using the library superagent on my server nodejs, I am following the documentation, however, it is not working. Follow my code nodejs: var express =…
-
2
votes2
answers816
viewsMake one asynchronous function wait for another
I am developing a Javascript system with Node.JS and Redis, however, due to the asynchronous functions the loop ends before the functions, which causes the response array to be misordered or the…
-
2
votes1
answer28
viewsHow to exchange the present database schema config.js?
I am working on a finished application developed in Node.js/Expressjs. At the moment my problem is: 95% of the application uses schema A, but the new module I’m creating need to use schema B. How do…
-
2
votes2
answers1588
viewsHow to pass input value with POST method using Angular
I’m trying to pass certain values of a input through the POST method using Angular, but I’m not able to pass these values in the URL and not even pick them up on the server. Could someone help me…
-
2
votes2
answers115
viewsChange in json File Format
My file is coming in this format, but I would like it not to appear this #id information before sale: { "$id": "1", //como não mostra isso? "venda": [ { "$id": "2", "poule": 73, "idusuario": 4,…
-
2
votes1
answer143
viewsI can’t publish my MEAN app to Openshift
I did everything that feels right. I changed the local variables to process.env, but when I commit and send I get this output: Pushing to…
-
2
votes1
answer1172
viewsNode.js receiving GET command
Hello, due to some problems to load the bootstrap Twitter libraries in my project, I made several changes to it, in which with help from other users, I arrived at the following Node.js code: Node.js…
-
2
votes2
answers191
viewsNodejs debug using visual studio code
I’m using Visual Studio Code and I’m not able to debug a nodejs for it. If I put one breakpoint anywhere in my app.js and start debug, it works, but when I already have it in the browser and switch…
-
2
votes2
answers179
viewsFunction that generates file
How to create a javascript function that generates a.ini file? For example, I will fill in 2 fields and it will generate a file like this [teste] nome: "campo 1 que vou preencher" teste: teste…
-
2
votes1
answer645
viewsInserting documents from Mongodb
I have the following document(Schema): var CandidatoSchema = new Schema ({ id_login: Schema.Types.ObjectId, nome: String, cpf: String, dataNascimento: Date, sexo: String, estadoCivil: String,…
-
2
votes1
answer42
viewsTwo Salesforce Queries Generate Undefined Values
I’m performing two queries in Salesforce. However, when I try to use the values received outside the scope of the query, they are undefined. Follows the code: var conn = new jsforce.Connection();…
-
2
votes2
answers379
viewsArray returning Undefined because of asynchrony
I’m accessing the API of Trello, but I came across the following problem: Access Trello information by obtaining the id of each existing queue, the code is as follows: var x; var numberCardsByList =…
-
2
votes1
answer772
viewsUser profiles for REST API access using Nodejs + ORM Sequelizejs
There is a way, or some cool package, to work with user profiles for access in certain endpoints of the REST API, as per each one’s permission? I am using Nodejs + Express + Sequelizejs as ORM.…
-
2
votes0
answers189
viewsReturn pdf file from webservice with Node.js
Context of the Problem: There is an external webservice, which is not part of the domain of my application, which, when accessed directly via browser, takes the user to a uploading web page that…
-
2
votes2
answers411
viewsUse Angular 2 without Nodejs after build
I am developing an application in Angular 2 using Webpack. My doubts are, after I build for production: I can run this app without the Nodejs ? I can run the app Angular 2 no server, right in the…
-
2
votes1
answer1163
viewsMongoose - Single object in an array
I’m new to Mongodb and Mongoose, I’d like to ask a question. I would like to store multiple objects in an array, the object being ONLY unique in that array, based on a string. See in the example…
-
2
votes1
answer1566
viewsNode.js does not load js or css scripts
I’m making a chat app and I can get the page I want but this page does not load the corresponding css or js scripts, does anyone have a solution for this please? So far I’ve got this: Code:…
-
2
votes1
answer568
viewsWeb Crawler (Spider) with ajax in JSF using Node.js or Jsoup api in java
I have the task of creating an interface optimized for touch monitor, taking data from a website (http://www.consultas.der.mg.gov.br/grgx/sgtm/consulta_linha.xhtml). This site gives a listing of bus…
-
2
votes3
answers450
viewsSocket.io chat, setting url
I would like a help with chat using socket.io, I would like to define a URL, I am not getting, I can only access through localhost:3000. For example I wanted the chat to be on the homepage of my…
-
2
votes1
answer661
viewsAngularjs - multiple tabs in the same browser
I am using Angularjs in my Node application. When I try to open another Tab also with my application in the same browser ( or open another instance of the same browser ) I get this error: s:1…
-
2
votes1
answer556
viewsPassing BD query by Node for Array in Javascript Front-end
Hello, recently I’m studying a little web programming (I’m very early) and I ended up falling into Node.js, I’m finding everything amazing I’m just having a certain problem, I want to access mysql…
-
2
votes1
answer250
viewsSend data to client without using an additional url
Hello. What I want to know is the best way to send data to the client and this data will be received through a function (which can be executed in a click). In the example below I will render a page…
-
2
votes1
answer148
viewsThumbnails with Nodejs
How can I generate thumbnails of images I receive in Base64 format with Nodejs? Currently saved only the original, but would like to create the Thumb of each.
-
2
votes1
answer1192
viewsNode_modules is not recognized
Why does this happen at the Windows 10 prompt? Commands like in filename.js works. It happens when I try: node_modules/mocha/bin/mocha In the environment variables I put:…
-
2
votes1
answer1015
viewsReal Time Notifications with javascript
I’m building a Java application that should show real-time notifications on the screen. A teacher requests a reservation; Reservation data is stored in a json object (or in a request table); At the…
-
2
votes1
answer2790
viewsNode.js and Express - Typeerror: Cannot read Property
I’m getting the following console error: Typeerror: Cannot read Property '_id' of Undefined I’m reading the book "Mean Full Stack Javascript..." from the code house. During the development of the…
-
2
votes1
answer333
viewsGet size of a request
On my system, I receive several request, I wonder if there is a way to get the size of this request (req) received in kbs preferably, to get a sense of how much bandwidth was spent for that…
-
2
votes0
answers377
viewsNodejs application startup problem in UOL Hosting
Galley, I have my application running 100% on my local machine, but when I upload the files to my Node hosting on UOL HOST it doesn’t work on startup. I am using the same version of UOL Node…
-
2
votes1
answer644
viewsHow do I return the value of a query in the nodejs
Well, I have the following code: pool.query('SELECT * FROM `info` WHERE `id` = 1', function(err, row) { var jogo = row[0].jogo; console.log(jogo); }); The problem is, if I take out the var game of…
-
2
votes1
answer358
viewsList of values in a Session using Nodejs
I’m using the modules express-Session and express and I need to create a list of values in an item of a Session so that at some point I can add values to it. Ex: req.session.category = "Include key…
-
2
votes1
answer725
viewsERR_SSL_PROTOCOL_ERROR - Socket.io and Node.js
I am running a Node.js server using Socket.io to manage connections via Socket, but I am having a problem with SSL certificates. Most users can access the Node.js server normally, but others cannot…
-
2
votes1
answer453
viewsHow do I check with nodejs if a table is out of records?
Well, I intend to check a table with nodejs, to see if it is without records. How can I do this in a way that makes no mistake, with nodejs? Thank you.
-
2
votes1
answer55
viewsTwo Systems on the same server
I am creating a game server and in this game server will have several channels belonging to the same server, ai was wondering if it is possible to create two Listen on the same server, example: var…
node.jsasked 7 years, 1 month ago Hudson de Oliveira Felipe 85 -
2
votes1
answer219
viewsModel of the Mongodb
Hello! I’m starting to use Mongodb with Mongoose on Nodejs and I’m finding a strange behavior when creating Models mesus on Mongodb. Example: mongoose.connect('mongodb://localhost/db_teste'); const…
-
2
votes0
answers521
viewsRESTFUL API - What it would be
What would be a RESTFUL API? What is different from a Web Service (which has Webmethods with CRUD operations for example)? Thank you
-
2
votes1
answer543
viewsInterface GET and POST method with Angular + Node.js
I’m having some questions as a beginner and I wanted to help you guys out. I created a Home Automation, based on Microcontroller + Node.js + Angular.js. Angular.js communication with the…
-
2
votes0
answers657
viewsTurn Rowdatapacket into object to create login session
Good morning. I am making a Node.js application that when logging in you must save the user attributes (database attributes such as name, surname, email, id, etc). But when you have it displayed on…
-
2
votes1
answer375
viewscreate dynamic subdominios in the br registry
I am using br registry for my website and web system, in the server part I use nodejs and I am trying to create dynamic subdomains (widcard), when trying to use the nodejs widcard module it simply…
node.jsasked 7 years, 1 month ago Miguel Souza 21 -
2
votes2
answers2343
viewsHow to convert a javascript file to ts format?
I know that the Typescript language is used to compile Javascript files. But I wonder if there is any tool that makes it possible to do the reverse. Is there any way to convert a Javascript file to…
-
2
votes1
answer400
viewsWhat is the best way to use Node dependencies?
Introducing: Let’s go to a practical example, so that it is simple to understand... I want to use the framework Bulma in my project, so I run the following command: $ npm install --save-dev bulma…
-
2
votes1
answer193
viewsHow do I "onload" on NODE.JS? (Discord.js)
I’ve been trying to make a code for generate an image in Node.js using Canvas, but I am facing the problem that the image is not loaded before using it. I tried to use "onload" but it didn’t work…
-
2
votes1
answer307
viewsHeroku - Connect with mongoDB addon mLab
I need to connect to the Mongo database using the mLab addon. But I can’t enter or list when I run in local mode it’s working. I have the variable set: Any idea what it might be? My app.js var…
-
2
votes1
answer1128
viewsRunning a package.json file
Well, I have a project that has the package json. { "name": "designimpl", "version": "1.0.0", "description": "", "main": "gulpfile.js", "dependencies": { "browser-sync": "^2.18.8", "del": "^2.2.2",…
-
2
votes1
answer1006
viewsControllers and Routes in Node js
I wonder if it implies any difference between using only routes, or routes with controllers in the Node js, could someone give me some example of how to implement routes and controllers on Node…
-
2
votes1
answer210
viewsTrouble at startar Gulp serves
Good afternoon, I’m creating a portal in Angularjs and Node. After installing npm in the workbook npm install and Ben bower install The tutorial asks for the command to be done gulp serve, but this…
-
2
votes2
answers619
viewsWhat is the correct way to use an npm-installed package?
To explain my question I will use jquery as an example. I installed jquery from npm (npm install jquery). Then npm created the jquery dist node_modules folder where the jquery file I need is…
-
2
votes1
answer653
viewsCatch Querystring with Nodejs
I need to pick up the QueryString which is being passed to the server created on Nodejs. I’ve tried several ways but I can’t get the parameters of and Ph. I’m a beginner at Nodejs and the code I…
-
2
votes5
answers5717
viewsError npm and Ubuntu Node
I had many problems installing npm and Node in Ubuntu, now I have the following error: npm : Depende: nodejs mas não será instalado mais um monte de dependências... E: Impossível corrigir problemas,…
-
2
votes1
answer674
viewsNode JS, Socket.IO Rooms and namespaces
I’m developing a map-based android app, which will create chat rooms in some predetermined places and places where users need them. I did some research with mechanisms that I could use in my…