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
answers87
viewsHow to return value ( Webhook )
I’m trying to use the api.ai https://docs.api.ai/docs/webhook From what I understand, I have to return a JSON in the format: "fulfillment": { "speech": "Today in Boston: Fair, the temperature is 37…
-
1
votes0
answers122
viewsMutiplas connections websocket
I have a script that makes 4 or 10 connections with a game after I click the 'run bots' button, I tried to create a 'run bots2' button to create more 4/10 connections with the server but without…
-
1
votes3
answers978
viewsWhat is this <Buffer> in reading files in NODEJS?
I’m learning a little bit about NodeJS. The last thing I learned was reading a file. The question that left me doubtful is the following. When I use the function readFile with the second parameter…
node.jsasked 8 years, 10 months ago Wallace Maxters 102,340 -
1
votes1
answer1626
viewsaccess port problem in Node.js
I’m trying to learn about angular2, and I’m facing this problem. when I type : "live-server" this error appears to me below: live-server Error: listen EACCES 0.0.0.0:8080 I try to type the command…
-
1
votes0
answers168
viewsReturn json from a mysql blob
Good afternoon, I have a json returning the data from a Mysql BD and one of the attributes is a BLOB. Below is the return to better understand what I would like to know. [ { "id": 1, "name": "Onix",…
-
1
votes0
answers307
viewsWrite image file with nodejs
I get an image in image:data format and need to save it as an image on the server, I tried: var imageData = req.body.imagem.replace(/^data:image\/png;base64,/, ""); fs.writeFile(url, imageData,…
-
1
votes1
answer421
viewsProblem using javascript, NODE JS and CSV database
Hello! I’m doing a project for the school using IBM’s Bluemix and am having some problems finding my mistake. I am using a database in CSV that has as parameters the neighborhood, number of rooms,…
-
1
votes1
answer56
viewsUsing Q Promise to receive different Apis values
I need to get the values of some Apis. For example: calls to api1() and api2() return deferred.promise; I can do: api1().then( function(res1){ api2().then( function(res2){ console.log(res1, res2);…
-
1
votes2
answers96
viewsDecimal counting in nodes
I’m developing a system, where I have to start counting at 1:00 and go all the way to a number that will be chosen in the database. What I want to know is how I can make a rising counter in nodes,…
-
1
votes0
answers162
viewsHow does hybrid app that runs on Node.js work?
How the back-end issue works with Node.js in a mobile app? You can use the Phonegap Build service that compiles my application for the desired platform (Android or iOS for example). But what about…
-
1
votes1
answer254
viewsCut audio with javascript
People need to cut an audio in the client-side and send the "cut" bytes to Nodejs. Is it possible? How can I implement?
-
1
votes1
answer101
viewsQuery changing Join - Sequelizejs
How could you do this query using Sequelize? SELECT t1.* FROM Table1 t1 inner join Table2 t2 on t1.id != t2.t1_id
-
1
votes1
answer1094
viewsRoute configuration error in Nodejs with Express
I’m having a problem starting Nodejs, similar to this other post at this link, but had no more feedback from those who asked and the solution presented in the reply did not suit me either. The…
-
1
votes1
answer3765
viewsGet information from a url using Node + express + ejs
I set up a url in the following format: localhost:8080/forgetPassword/id/hash I have this route rendering: app.get('/forgetPassword', function(req, res) { res.render('pages/forgetPassword'); }); So…
-
1
votes1
answer50
viewsDoes uploading modules into a single file decrease app performance?
My project has several modules, if I load them all into one file - modulos.js - am I decreasing the app’s performance? ex: file that loads modules (modulos.js): exports.var1 = require("...")…
-
1
votes0
answers41
viewsDoubt with Findone in Angularjs using Mongojs error at search time
Hello I am trying to make a search in the bank with this code using the findOne of mongojs, follows code: app.get('/detalhesContato/:id', function(req, res){ var id = req.params.id; console.log(id);…
-
1
votes0
answers151
viewsReactive Programming With MEAN stack
I’m thinking about starting to develop a social network similar to Instagram, for learning purposes, using MEAN stack. I thought of my models : User’s: var mongoose = require('mongoose');…
-
1
votes1
answer109
viewsApplication error when performing Heroku open
Good people, I started a few days ago using the Mean Stack and I’m still very early. I’m using the book Getting Mean with Mongodb, express, angular and Node.js . I’m really enjoying the book, but…
-
1
votes1
answer145
viewsError installing Babel npm package in my project
I am trying to install the Babel package in my project. But while running the command: npm install --save-dev Babel-cli, an error occurs in the installation of tar.unpack. See in the image: I tried…
-
1
votes1
answer451
viewsDoes compressing all Nodejs JS files (node_modules) decrease performance?
In my application I am using Gulp to compress all my files JS inside the case node_modules, my question is on performance, it is a bad practice to do this or not? If you have any suggestions will…
-
1
votes1
answer3114
viewsRelationship in Mongodb
Folks good afternoon, I’m in need of some help from someone who has experience with Mongodb to clear me a doubt. I’m studying about Mongodb and I came across the following problem: I have 2…
-
1
votes0
answers354
viewsNodejs for real-time applications
Recently, with the arrival of Angular2 beta, I have been looking for more information about real-time applications. Currently I work with AngularJs (1.x) in the front-end with apache server in MySql…
-
1
votes1
answer559
viewsIonic error to start app
I’m starting my studies with Ionic v2. I upgraded the Ionic version to v2 however when I run the command ionic start wiltonfinances blank --v2 and displayed an error message. See the information…
-
1
votes1
answer84
viewsDifference between extends and include using the SWIG Template Engine
I’m using the Template Engine with Nodejs and I couldn’t understand the difference between using extends and include. I was able to understand that the include you included directly a part of HTML…
node.jsasked 8 years ago cmcampos86 207 -
1
votes2
answers620
viewsWhere em Join - Sequelize
Hello, I want to do a search within several tables, for example: SELECT * from tab1 INNER JOIN tab2 ON tab1.tab2_id = tab2.id WHERE tab1.name LIKE '%blabla%' or tab2.title LIKE '%blablabla%' How…
-
1
votes1
answer104
viewsWhat is the best way to generate custom errors
For example, the user enters an invalid value, and I want to generate an error. It would be using throw new Error("Você digitou um valor inválido") and dealing with try/catch as in Java? Or there’s…
-
1
votes1
answer220
viewsIs there a better way to fill this array in Node.js?
Below this my function of Node.js (I’m new at this), I would like to fill the array with random numbers (could be with everything else), is there any faster way to do this ? Of what I’m doing ?…
-
1
votes1
answer44
viewsFunction that runs on scheduled time
How to create a function that runs for example every 5 minutes in the nodejs. I found the lib: http://bunkat.github.io/later but I don’t know how I make it to be executed always, and not just once…
-
1
votes0
answers38
viewsSocket.io-Stream does not broadcast events
I have a client application that sends files through socket to my server, these files arrive as stream through Socket.io-stream, and I write them on disk without any problem everything was going…
-
1
votes1
answer184
viewsCompare multiple arrays
I have two arrays, being them: data [ 0{ nome: a numero: 2 } 1{ nome: b numero: 3 } 2{ nome: b numero: 3 } 3{ nome: b numero: 8 } ] dataNota[ 0{ nf: 9999 numero: 2 } 1{ nf: 2000 numero: 3 } 2{ nf:…
-
1
votes0
answers38
viewsWhy does variable have same value for different instances?
I have the following code File 1 : var fbuser_firstName; var FB = require('fb'); var User = function (sender) { FB.api('/' + sender, 'get', {access_token: process.env.PAGE_ACCESS_TOKEN}, function…
facebook-graph-api facebook-javascript-sdk node.js facebook-apiasked 8 years, 5 months ago Thiago R. 267 -
1
votes1
answer83
viewsHow to ensure security of api’s Rest
I’m creating a system using MEAN Stack and I came up with a question .. My angular client application requests the ex api: POST http://127.0.0.1/api/product If some malicious user found the url of…
-
1
votes0
answers76
viewsTypeerror: Object [Object Object] has no method 'Listen'
const DEFAULT_SERIAL_PORT = "/dev/ttyUSB0"; // Dependancies var fs = require('fs'); var vm = require('vm'); var events = require('events'); var cache = require('./plugins_cache.js'); var util =…
-
1
votes1
answer91
viewsDoubt with Ionic project generation
I have this environment installed: Nodejs = Node-V6.9.1-x86. msi npm = 3.10.8 jdk = jdk1.8.0_91 Cordova = 6.4.0 Ionic = 2.1.13 When entering cmd as administrator, I requested the creation of a…
-
1
votes1
answer30
viewsManage urls on a system
I’m on a project where there’s the test environment, and the production environment. When I am developing in test, I use some different urls for this. I use some Amazon services, and they are…
-
1
votes0
answers192
viewsHow to model a system of friends with Mongodb?
I’m creating a small social network and I need to create the friendships part. I have two ideas: A Collection Friendships containing the fields sender, destnatary and answer and make a populate with…
-
1
votes0
answers106
viewsAuthentication problem with firebase 3.0 in Node.js
Because firebase has upgraded to version 3.0 and it is necessary to migrate to the new version, a problem has arisen regarding my Node server authentication. The code is like this var firebase =…
-
1
votes1
answer259
viewsHow do I keep the browser scrollbar at the top by loading a new angled page?
I’m using modules created with Ode and Angular, by project specification we had to take the # of the navigation. However, when I click on a link that is on the footer and loads another page the…
-
1
votes1
answer351
viewsTelegram bot using Node.js finishing sending the message
Hello, I’m doing a service to warn me of possible errors that may occur on my server,my doubt is , after I send the message how I finish the execution or the way this presenting in the image below…
-
1
votes0
answers22
viewsGrunt Concat Does Not Unify Files
I want to unify my css files into one, but Grunt doesn’t unify. It works perfectly for javascript. Follows: concat: { options: { separator: '\n\n', }, css: { src: [ 'dist/app/css/*.css' ,…
-
1
votes1
answer1641
viewsTake Geolocation Coordinates (Reactjs)
Hello, I am developing a simple application that takes the geographical coordinates of the google maps api. It’s working, but I’m not getting the values that are in the other function. Actually I…
-
1
votes2
answers231
viewsDoubts with Node.js - Error: route.js:162
I am facing problems running my application. I performed the correct mapping, according to the book in which I am learning (MEAN stack Code House). express.js file // config/express.js var express =…
-
1
votes1
answer1007
viewsHow to use the content of a javascript variable in another js file?
I am creating my first application with nodejs and have a question in javascript. In the code below I am reading a sensor and saving in variable value every 30 seconds, I wonder if I can use this…
-
1
votes1
answer1515
viewsError in the use of WS from the IRS, (Rejection: Use only the standard NF-e namespace)
Hello! I am trying to access the SOAP service of approval of the IRS to run the service status query, I have made all possible combinations (including those present in the last manual published) in…
-
1
votes1
answer46
viewsNodejs in the Azure
I did a simple public project on API Nodejs. https://github.com/andreraica/NodeAPI However when publishing and accessing the API in AZURE did not answer: ERR_CONNECTION_TIMED_OUT Running site works…
-
1
votes1
answer138
viewsHow to handle my app routes with Express
Guys, I’m using a framework for the front of my app. He keeps listening and whenever you click on a link he returns the page via Ajax request. Note: I am using Angularjs. With Angular I can treat…
-
1
votes0
answers286
viewsserial port Node.js
I need to write a code for Node.js who receives a "post request" (in this case a word String), and pass this word forward to serial port. Then get another word from this serial port and put this…
-
1
votes0
answers128
viewsHow to check new fields entered into a mysql table in real time?
In my work there is a database where a turnstile system inserts new fields in the table and the Nodejs application needs to check when it has new fields inserted. How best to monitor a table in real…
-
1
votes1
answer115
viewsReturn value 'Undefined' because of asynchrony
I have a file called validationForgetPassword.js with the following code: "use strict" var config = require('./config'), createHash = require('sha.js'), pgPromise = require('./pgPromise'), winston =…
-
1
votes1
answer516
viewsReuse of connections in Nodejs + Mongoose
I’m starting now with Node and used Mongoose to make my connections to the database in Mongodb. I put 1 log in my application, for every time I open the connection it print in this log. What happens…