Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine.

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

design document for logger for node.js

We have been tasked to create a design document for a logger for a node.js project. We have have taken winston logger as the base logger upon which we will perform the necessary modifications. ...
0
votes
0answers
3 views

Cannot connect to node server on public netwok

I have a socket.io node server that is connected to through front end JS in the users browser. When I'm at home or in the office on a private network it works great but when I'm using a public network ...
0
votes
0answers
3 views

Catching Browserify parse error (standalone option)

I'm using gulp + browserify to build and package my javascript library. Now there is one thing that bothers me: I'm running a simple server with livereload for development via gulp. This works fine, ...
0
votes
0answers
9 views

Multiple queries inside mongodb query

I'm having an issue when trying to query based on the result of another query on mongodb. I'm trying to make an initial query and then do another query for each one of the result of the first query. ...
0
votes
0answers
4 views

Azure Mobile Services - Getting more user information

I inherited a Windows 8 application that is written with XAML. So in C# when I make this call user = await MobileServices.MobileService ...
0
votes
1answer
5 views

How to send flash messages in Express 4.0?

So my web application requires authentication, and I have a signup page where if the person tries to sign up with an email that is already in the database, I want to show them an error message. I'm ...
0
votes
1answer
2 views

Use “readabilitySAX” on distant pages, in Node.js

I want to get the length of articles published on newspapers and magazines websites and on blogs. In a server made in Node.js, I want to use the "readabilitySAX" module ...
0
votes
0answers
4 views

a file upload progress bar with node (socket.io and formidable) and ajax

I was in the middle of teaching myself some Ajax, and this lesson required building a simple file upload form locally. I'm running XAMPP on windows 7, with a virtual host set up for http://test. The ...
1
vote
1answer
6 views

failed to load c++ bson

I'm new to this whole Nodejs, MongoDB, mongoose world. I'm just trying to follow some tutorials to get started and I keep getting this "Failed to load c++ bson extension, using pure JS version" error ...
0
votes
0answers
5 views

node.js scalability with event timers (setTimeout)

I'm building a turn-based text game with node.js and socket.io. Each turn has a timeout and after that the player loses the turn and it passes to the next player. I'm using the setTimeout function as ...
0
votes
1answer
29 views

Accessing values from blocking Javascript functions in Node

The below function, startScript, contains blocking code that takes some time to run. In my setInterval loop, I want to access the weight value that it returns. However, when I run this Node program I ...
0
votes
1answer
10 views

Expose vs Creating object in Router file of Nodejs

So, I just started with expressjs 4.0.0 and came across the express.Router() object, which is really nice. Problem is, now that all my routes are in another file, how do I expose an object to the ...
0
votes
1answer
14 views

Q and mongoose confusion

I'm doing some slightly complex post processing on some mongoose documents and I ended up adding Q to help with managing the async. I can get things working but I'm a little confused by what's going ...
0
votes
0answers
3 views

Unit Test Response Header Message Using MOCHA

I am using the Express framework. The task is to retrieve a collection from the database (the Node.js code works and the collection is retrieved). I am also required to insert a customized message ...
0
votes
1answer
13 views

Remove MongoDB table elements via node.js

I am populating my db (--modulus.io) everytime I run the server, in my model, since that gets called. However, I am unable to remove the contents of the table right before I populate, so I get ...
0
votes
1answer
15 views

How does Node.js handle unclosed HTTP responses

Consider a trivial express app: app.get '/hang', (req, res) -> console.log 'Request ', n n += 1 # res.send 200 Whoops, I've accidentally commented out the res.send, oh well, let's see what ...
-2
votes
0answers
27 views

How can i prevent my nodejs program from stacking ram and crash later?

I created a nodejs program for my development board (beagleboard black) but i got 1 problem with it. After a week or 2 my program will crash. (Can't find reason. Can't find the nodejs logs). Here are ...
1
vote
0answers
17 views

Meteor app deployed to Digital Ocean stuck at 100% CPU and OOM

I have a Meteor (0.8.0) app deployed to Digital Ocean that's been stuck at 100% CPU, only to crash with out of memory, and start up again at 100% CPU. It's been stuck like this for the past 24 hours. ...
0
votes
0answers
7 views

ERROR [karma]: [TypeError: Cannot call method 'push' of undefined] when adding HTML output

I'm using karma and jasmine for some unit testing. I'd like an html output instead of checking the console / terminal and found this: https://www.npmjs.org/package/karma-htmlfile-reporter which is ...
0
votes
1answer
22 views

mongodb order/$sort by array entry

the item schema : var ItemSchema = new Schema({ name: {type : String}, possibleorders: [{ name: {type : String}, value: {type : Number} }] }) How do I order/$sort the items ...
0
votes
0answers
3 views

How to use POST method having relationship between schemas in mongoDB?

Hello guys i'm trying to do a REST API with node.js, express and mongodb, but im little confusing with this model i have for example: Model User.js var User = new Schema({ name: { ...
0
votes
0answers
8 views

node-webkit: Why does the errno in node-webkit differ from NodeJS?

Run the same code in node-webkit and NodeJS var fs = require('fs') // var fs = process.mainModule.exports.fs // node-webkit fs.readFile('/xxxx/xx','utf-8', function (e) { console.log(e) }) In ...
0
votes
0answers
5 views

Load order while bootstrapping models

In my express app I load the model like so models_path = __dirname + "/models"; fs.readdirSync(models_path).forEach(function(file) { if (~file.indexOf(".js")) { return require(models_path + ...
0
votes
0answers
15 views

NodeJS :Unhandled 'error' event

var express = require('express'); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = ...
0
votes
0answers
10 views

Coffeescript array ranges without bounds

I am learning coffeescript and some of my code uses the very convenient array ranges syntax. My understanding was that using [a..b] includes indices a and b in the result and that [a...b] excludes ...
0
votes
1answer
8 views

Coffeescript array comprehension skip value

I have an RPC library that I am porting to coffeescript. One of the things that it has to do is reorder function call parameters to make sure that they are in the correct order. To do this I have ...
0
votes
1answer
12 views

do 'blueprint shortcuts' in Sails skip validation?

For dev I'm using 'blueprint shortcuts' in Sails to create some records quickly. However, I now noticed that I can create multiple Users with the same username although I've specified username to be ...
0
votes
1answer
31 views

CSS/JS with Node.JS in localhost

i'm discovering Node.js and i get a little problem with my .css and .js files in localhost. I tried a lot of things but didn't work in my case ...
0
votes
0answers
8 views

socket.io node.js vs simple node.js ajax vs php/ajax (for data)

Hello StackOverFlow community, My Configuration : I'm building a php app based on an MVC (C module) and I am using nginx. The session is stored in Redis (session server). And I have node.js and ...
0
votes
1answer
15 views

'-' character causing express dot to crash

I am getting an error trying to parse a JSON structure with Node.js, Express and DoT. It appears to be processing special characters in the JSON object below... <td> {{= "Overview: " + ...
0
votes
1answer
14 views

sails: disable `blueprints actions` in production, since it creates a huge security footprint?

Getting acquinted with Sails for Node. One thing I need to get used to is the 'automagic' way in which routes for controller-methods are set-up using blueprints. For example, from the docs, if ...
-1
votes
0answers
15 views

unable to access github api with the IP address on the url from nodeApp

Due to DNS lookup restrictions in our network, we are trying to access api.github.com using the ip address retrieved using nslookup. When i execute the below code,I get error. Not sure if we ...
0
votes
0answers
10 views

node.js running localhost, how to configure to allow cross site requests from a local app?

I have a local web app that is on localhost:3000 and it has xhrs that hit localhost:4000. Trouble is, due to the default policies enforced probably by chrome on mac osx, it will send an OPTIONS ...
0
votes
1answer
12 views

Meteor Autoform package with collection2 does not submit the form

I am using using collection2 and autoform with one level nested schemas Node = new Meteor.Collection('node',{ schema: new SimpleSchema({ content: { type: String, label: ...
0
votes
0answers
8 views

Allocate terminal with child_process

I'm using child_process to run a script that ultimately calls ssh -t server "sudo command" I get back: Pseudo-terminal will not be allocated because stdin is not a terminal. sudo: sorry, you ...
2
votes
1answer
14 views

Is it feasible to use a local image in Stylus and Node.js and Express?

Here's the situation: I would like to use an image in my Web app, and in my Stylus file (style.styl), I can use the following code to set the image: .background background: ...
0
votes
0answers
15 views

Create GitHub repo from node.js

I have this function in my node project, that should create a new GitHub repository for a specific user: exports.create_repo = function (repo) { var options = { host: "api.github.com", path: ...
2
votes
3answers
34 views

How to declare a function: as a separate function or in the same function

Hello Stackoverflow people, The questions, is about code style and code maintainability, rather than search for some errors. Let's assume that I am creating some module for node.js. This module, is ...
0
votes
0answers
11 views

Node.JS crashes with “cant set headers after they are sent” error

I have a Node.JS based server. One of the functions of the server is to receive a photo from a mobile client and store it in the mongodb. When there is a bad connection, the file upload process fails, ...
0
votes
0answers
15 views

Can't get CORS working in Firefox

I'm trying to get a simple example working with the MEAN stack and I noticed that my DELETE request does not work in Firefox. I believe this is due to CORS. When i click a link to submit a DELETE ...
-1
votes
1answer
12 views

Cordova: Cant add android platform on windows 8

i have developed android applications in linux and wanted to try developing it on other platform like windows. i have installed all the necessary files (node.js, ADT bundle for windows, cordova, ...
1
vote
0answers
5 views

How to retrieve natural features of a certain GeoLocation with OSM?

In a node web-application I need to find out, what the natural features of the location of the user are. I know the longitude and latitude of a user and I found out, that the tag natural holds ...
0
votes
1answer
19 views

npm doesn't work with latest stable node?

I am really new to node/npm, but I upgraded my node (I don't even remember why at this point) when I was trying to install a logging solution (which aren't compatible with 0.10 anyway) and now npm ...
0
votes
1answer
13 views

sails: how to redirect after creating a model with the built-in crud operations?

I'm dong some quick testing with the Sails framework for Node. I like the way default CRUD-operations work out of the box, once a model and a controller (e.g.: for user ) are created. I'm having a ...
0
votes
0answers
7 views

Fail to access socket.io from any folder other than nodejs root

I am a newbie for Node.js & socket.io. I installed Node.js thru its windows installer on my Win 8.1 *64 bit system. I am referring this tutorial Node.js Tutorial with Socket.IO to learn more about ...
0
votes
0answers
10 views

Custom chrome for Node Webkit?

Here is what I am aiming to build: Full size of image is here. Is this possible to do with Node Webkit? I know I can visit sites, but I want to change the default chrome and add more ...
0
votes
1answer
8 views

How do I escape an apostrophe in my variable name within ejs

I have an ejs file in my sails application that looks like this <a href='/<%= viewname %>?where={"name":"<%= profile.pname %>"}'> This works for most of the names with the ...
0
votes
0answers
10 views

Decoding Rijndael with node.js

I have to decode a rijndael 128 string the string can be successfully using this online tool http://www.tools4noobs.com/online_tools/decrypt/ with theses parameters : Algorythm rijndael 128 Mode : ...
0
votes
0answers
13 views

Socket.IO with single player game with smartphone as a controlling device

I'm trying to build a single player game (point and click), where you can use your cellphone as a controlling device. I've created login for a user where he/she can choose between keyboard and cell ...
0
votes
1answer
12 views

Streaming real time video from rtsp and displaying in the browser

if I enter rtsp://xxx.xx.xx.xxx I have video camera online I would like to display it in the browser, how I can capture camera stream from rtsp using node js?