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
answers265
viewsAudio stream (Webradio)
Good afternoon. Excuse my ignorance, but how do I create a radio web (in a very rustic way, only for study purposes)? My project is the following: I have a website that plays the audio and who…
-
1
votes1
answer52
viewssocket.io inside express.js or vise versa
How do I put the sockets inside an express post? I need to identify a connect from the express session app.post('/login',function(req,res){ io.sockets.on('connection', function(socket){…
-
1
votes0
answers55
viewsHow to create and connect users in new Rooms with soket.io
am using socket.io 1.3.5 and express 4.12.3 to create chat app in my script php, but I don’t know the logic of creating a new room when one user calls another. As kids: I know how to create a room…
-
1
votes0
answers194
viewsHow to host server on local router with Express.js on Mac OS X?
Since I started using Mac I am no longer able to host a local server on my router with Express. In Ubuntu just pass the router IP as second argument of app.listen and everything worked out: thus.…
-
1
votes1
answer366
viewsexport json file
I’m using nodejs, Mongoose. No controllers at the end give a res.json(clientes); and on my route I create: app.get('/clientesjson/:id', isLoggedIn, cliente.clientesjson); I need to access my Json…
-
1
votes1
answer250
viewsChat with nodejs and mysql
I created a chat with nodejs and Mysql to search for information from user... but I have a following problem: when the connection drops or restart the server nodejs, do not go back logging user and…
-
1
votes1
answer195
viewsAngularjs php Node apache2
I started developing in Node.js using the frameworks Express and Angular when I needed tutorials I noticed that in some is used the Angular along PHP to make bank requests. My question is: which…
-
1
votes2
answers219
viewsStop loop in function inside another
Good morning, I’m starting on nodejs. I need to get one function that is called inside the other back into my loop, but I’m having a hard time with that. Follow below the code I made. From loop to…
-
1
votes0
answers105
viewsMongoose syntax error
I am trying to create an application using express.js and mongodb, when I try to run the server this syntax error appears. The error that appears refers to a zero-only document (Ex: 0000 0000 0000…
-
1
votes0
answers259
viewsCopy directory to another on site
I have a site in PHP and Javascript. I set a button with the following function (found on the internet, called wrench.copyDirSyncRecursive): function atualizaIR(){ dir1 =…
-
1
votes0
answers51
viewsVirgin-Acl nodejs
I need to create access permissions on my page, but I have no idea where to start. I installed the virgin-acl. I have for example the page below and I want a user example just view:…
-
1
votes1
answer404
viewsPass Nodejs json to Angularjs
I have a server running on Nodejs using Sequelize for ORM, everything works fine, but I needed to pass the query result to the angular. My server is like this: var express = require('express'); var…
-
1
votes1
answer682
viewsNode.js - Take URL parameter via Jade
I have the following url http://localhost:3000/user/index/1, would like to get the last parameter. I tried with - var name = window.location.pathname; put in the file . jade and did not work, but if…
-
1
votes0
answers183
viewsBest way to treat string in nodes
I am working on an application using a socket for an application on my server. I’m having trouble handling the calls generated by the net module. My application is in real time, that is, every 200ms…
-
1
votes1
answer1283
viewsSum of Nodejs + Mongoose values
I need to sum the values stored in a variable in the bank. I have a form and want to know the total value generated in a variable. So I did it this way: _.each(cliente.data, function (data) {…
-
1
votes0
answers59
viewsopenshift giving problem
good guys I have some projects in openshift but as they do not support anyone by the company website then they use stackoverflow to answer people’s questions: for those who do not know openshift is…
-
1
votes1
answer74
viewsauth_token Node.js > Instagram
To make a script work I need the auth_token of an instagram app, and that according to instructions I should(and am) doing so:…
-
1
votes2
answers3444
viewsForm for HTML file Node.js
Hello! I want a help here: I want when a person writes something in an HTML form, with the node.js, i can save this information in a text file with createFile. I don’t know much about javascript,…
-
1
votes1
answer30
viewsThe stack property is not removed from the Error object when includeStack equals false
The stack property is not removed from the Error object when includeStack is equal to false: "final:after": { "loopback#errorHandler": { "params": { "includeStack": false } } } Even with…
-
1
votes1
answer1876
viewsLine break Json
I’m trying to develop a system with Node.js and I’m trying to list the database data in my table, but the data stay together this way: I still don’t know much about Json, is it because he’s this…
-
1
votes0
answers138
viewsError while updating Cordova
When trying to update Cordova on my computer Node is generating the following error. D:\Desenv\tfs-soek\xampp\biltspot>npm install -g cordova npm ERR! Error: connect EACCES npm ERR! at…
-
1
votes1
answer175
viewsDifference of using own module and libraries, Nodejs
I’m starting in nodejs, it’s all "new" and I’ve come across this conflict. There are the modules (I call modules, I don’t know if it’s right) ready etc.. however I have libraries like Cryptojs which…
-
1
votes1
answer2484
viewsConsume REST API in Node.js + Curl
I know there are several packages in Node to consume REST API but I need one that uses cURL. For some reason (which I haven’t discovered) I can’t authenticate with existing ones. I tried to…
-
1
votes1
answer43
viewsUse of filter in ng-repeat in jade templates
Guys I think I’m doing something wrong but I’m not finding the error in the code. ul(class='list-group') li(class="list-group-item", ng-repeat="v in votadas | filter: '-votos'") h4 Música: {{…
-
1
votes2
answers296
viewsNode generating Json
I have to develop a Java application that through a Json communicates with Node and changes the site language. The problem is: the Node has to access the site’s literals/Labels at .txt and turn it…
-
1
votes0
answers32
viewsError "io is not defined" socket.io
Guys, this error is happening to me when using the socket.io: "io is not defined". Already link the CDN socket.io and locally; I’ve used and "disfigured" the Express and nothing. The interesting…
-
1
votes0
answers43
viewsHow to install and configure Markdown in Meteor together with React?
I’m learning React along with Meteor, so I saw in the official React documentation the use of Markdown is a good practice against XSS. I downloaded it in the media with "Meteor add markdown" but…
-
1
votes1
answer34
viewsAppcelerator error: Unable to locate cli Executable
I’m using OSX El Capitain and I just downloaded Appcelerator Studio. After installing I tried to run, and when I try to log in I get this error message: Unable to locate CLI Executable (screen print…
-
1
votes1
answer219
viewsReserved word usage "import" in javascript
Reading the Ghost code, CMS platform based on Nodejs found a file with the following statement: import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from…
-
1
votes0
answers258
viewsreal time application with php
I have the following problem I need to implement real-time actions in an application already developed using php running on iis. I already managed to make my application communicate with an…
-
1
votes1
answer53
viewsError installing Windows 8.1 Cordova
I’m having trouble installing Cordova on my machine, I followed the steps of the link himself Cordova however it was not working, it is giving error as follows :…
-
1
votes1
answer4982
viewsHow to call the bootstrap module on the html page in a Node project?
I’m using the Node and lowered the dependence on bootstrap, but I don’t know how,call it on the index.html page, to use the bootstrap.min.css file, what should I do? I have the following directory…
-
1
votes2
answers76
viewsHow to install Grunt offline?
I’ve got the Node.js and Npm installed and wanted to know if there is a way to install Grunt and use it offline?
-
1
votes0
answers117
viewsBad Request when logging in with Passport, Express and Nodejs
I am trying to authenticate a system but whenever I try to login (post) I get an error: 400 (bad request). On the console appears the message: The Character encoding of the Plain text Document was…
-
1
votes2
answers250
viewsSum number of records per year and month
I need to generate a Json file that will feed a graph. I need to load the following information. I have a form that receives date(dd/mm/yyyy). My chart shows the number of registered visits per year…
-
1
votes2
answers495
viewsMerge two objects with the same ID
I need to concatenate two objects that have the same id. Example: a1: {id: 1, qtde: 2} a2: {id:1, nome: 'teste'} Upshot: a3: {id: 1, nome: 'teste', qtde: 2} Someone knows how to do?…
-
1
votes0
answers1095
viewsHow to redirect to a js Node page?
I can do this more with a route, but I want to do something like: app.redirect(url); and not: app.get('/', function(req, res) { res.redirect(url); }); someone can help me? vlw , and obgd!…
javascript node.js redirecting express url-forwardingasked 8 years, 6 months ago Henrique.Araujo 105 -
1
votes1
answer112
viewsHelp with the Mongoosis
Not understanding what happened: ready = function() { groups = mongoose.model('groups', schemas.group); groups.find({}, function(err, docs){ for(i in docs){ console.log(docs[i].name); } return docs;…
-
1
votes2
answers63
viewsread arrays in jade
I need to read an array on my jade page. In my controller I am passing as follows: res.render('graphics/index', {namesClient:JSON.stringify(namesClient)} In jade I’m reading as follows: var names=…
-
1
votes0
answers33
viewsHow to create a topic structure with Jekyll / Liquid
I’m trying to create a topic structure to simulate a direct link menu for the post. This structure would be similar to help manuals by topic or as the chapter structure of books. The problem is how…
-
1
votes0
answers58
viewsProblem with NPM Nodejs Compass
I’m in trouble here with Nodejs. First I run the remote: npm i Then I turn the remote: grunt There goes that mistake: Warning: Couldn't find the `compass.bat` binary. Make sure it's installed and in…
-
1
votes1
answer196
viewsNodejs and Mysql problems
Hello I’m having problems with over-connecting with node-mysql2 using a connection pool. I would like to know if there is a better practice regarding implementation, and what is the best driver to…
-
1
votes0
answers96
viewsMean Stack Running the first project
Good afternoon guys, I’m trying to run the Mean stack on my machine (Ubuntu 14.04, 64bits), I followed the step by step site and apparently everything went well when I run the cameo on the ternimal…
-
1
votes1
answer827
viewsHow do I send a message to a specific room with Socket.io?
How do I send a message to a specific room? guy: server.js io.in('roomA').on('msg', function(msg) { ... }); client js. io.in('roomA').emit('msg, 'Hi');…
-
1
votes1
answer172
viewsError creating project with Java with Jhipster
I’m creating a project by Jhipster in windows 10. When running the yo jhipster command and selecting the tools I will use I get the following error when creating the project:…
-
1
votes1
answer38
viewsProblem with Return
I have a problem with return since the node is all asynchronous. var myFUNC = function(A, B) { A.every(function(AA) { return (AA === B); }); return true; }; if(!myFUNC(...)) { .... } obviously the…
-
1
votes1
answer245
viewsHow to include a regex in the parameters of an Express route?
In a project I’m doing I want to point a specific route to a controller. In a simple case of a route with parameters I would do so: app.get('/:lang/:activities/:activity',…
-
1
votes1
answer160
viewsHow to save php session in Mongodb and recover data in Nodejs
I’m running a server on php and another in nodejs trying to get a simple authentication since every session runs in php and nodejs simply processes some events however, and required authentication…
-
1
votes0
answers116
viewsMysql Query in Node ignoring difference condition
I have had a peculiar problem while changing my Node.JS server to certain Mysql queries. I have the following code that works normally in Mysql Workbench: SELECT id, nome FROM `tabela` WHERE…
-
1
votes1
answer438
viewsDatabase loca + Node.js
I am working on a project using Node.js. I need to use a local database, but I wanted to reconcile performance with security, and if possible, portability as well. I only know MS Access (.accdb) and…