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
6 views

NodeJS server, res.sendfile returning HTML but not the “jscript includes” (<script src>)

Basically I want to make a server and then a simple javascript site with phaser to try some stuff, but the html stuff shows, but not the javascript. Here are my different files & codes: ...
0
votes
1answer
5 views

NodeJS & Socket.io: Socket in a controller

I have this code: app.js: 'use strict' var express = require('express') , http = require('http') , path = require('path') , app = express() , fs = require('fs') , engine = ...
0
votes
0answers
16 views

Writing to a JSON file (Using Node.js to work on a Localhost server)

So I am using C3.js, a chart library built on top of the widely used D3.js visualization library. So as a part of the webpage that I am creating with a chart, I want to include a user interaction in ...
0
votes
0answers
4 views

cordova build Command failed with exit code EACCES

Cordova build failed with error code : EACCESS $ cordova build android Running command: /home/user/proj1/platforms/android/cordova/build execvp(): Permission denied Error: ...
0
votes
0answers
14 views

Best way to grab information from HTML page with Node.js script

I am using a Node.js script to run stats and such. However, I need to grab a value from a table on an HTML page. I'm currently using an abominable .split() and .substr() on the <td> tags and ...
0
votes
0answers
5 views

Node.js SSL authentication

I set up a HTTPS node.js server, but I'm having trouble understanding how to use it correctly. app.get('/test', function(req, res){ console.log('got in'); if(req.client.authorized){ ...
0
votes
0answers
3 views

Gulp plugin “gulp-filter” not restoring files in the stream as intended

I have a gulp task that does a pretty simple task, it searches for all files in a folder, filter html files, validate them and then restore file stream and push every file type in the destination ...
0
votes
1answer
10 views

Sockets server2server connection

Sockets unlike HTTP doesn't have anything that is req, res it is always like: client.on('data', function(data)... Event gets executed when there is data on the stream. Now I want to do a Server 2 ...
0
votes
2answers
9 views

Send user input from NodeJS to shell script

I have this NodeJS script: var util = require('util'), process = require('child_process'), ls = process.exec('test.sh'); ls.stdout.on('data', function (data) { console.log(data.toString()); ...
0
votes
0answers
13 views

Node.js and zeroMQ request and response

I have built two Javascript-files, where I implement a responder and requester within zeroMQ and node.js. Once i start them, the first one sends all the requests, but the second code snippet doesn't ...
0
votes
0answers
14 views

Mongoose - is it possible to use parameters in mongo query?

I've found how to update in mongoose with this guide. I want to decrease a field, but the problem is: I want to get that field name in run-time. in other words - I want to send type parameter and ...
0
votes
1answer
13 views

NPM installation issues on Mac OS Mavericks

I am trying to get to grips with AngularJS, NodeJS and Ruby on Rails. When trying to install npm packages like yeoman, grunt etc. I receive an error in my Terminal which I have listed below: npm ERR! ...
0
votes
1answer
25 views

Adding a callback to a event

Is adding a callback to a event okay? Like so? Client.prototype.send = function(data, cb) { // convert json to string data = JSON.stringify(data) this.client.write(data) // wait for the ...
0
votes
0answers
5 views

run websocket-rails javascript client in node.js

I'm trying to retrieve data from a websocket using my own web server. The websocket server on the remote host runs websocket-rails. From the Websocket-rails github project page ...
0
votes
3answers
29 views

How to convert MSSQL datetime integer to YYYY/mm/DD format in JavaScript

I get data from legacy API where there is a field 'opendate': 1086652416 I know that this is 24/06/2014 initially I have decide that this is unix_timestamp which should be multiply with 1000 and ...
0
votes
0answers
5 views

Can't start gulp on Vagrant VM (Ubuntu, precise64)

Using Vagrant VM. I have a project with the following devDependencies in package.json: "gulp": "^3.8.0", "gulp-clean": "^0.2.4", "gulp-load-plugins": "^0.5.0" And the gulpfile.js: 'use strict'; ...
0
votes
2answers
11 views

Using stylus middleware with express 4, SyntaxError

Im trying to use nodejs express v4 with stylus, but its throwing SyntaxError. Please help, also you can find my server.js below;; Please note: Im first time creating MEANstack project, and dont be ...
0
votes
2answers
16 views

npm update error while trying to install ionic

I've got problems trying to install NPM. Always worked well, but now, i've to install "ionic" and the problem is that when i tried to re-install nodejs all work well, it seems that npm installed but ...
0
votes
0answers
15 views

NodeJS HTTP Agent?

I'm developing a NodeJS Application that will send a lot of requests to a RESTful API (For TwitchTV). I have permission from TwitchTV to make the mass of requests, but I was wondering if I could ...
-1
votes
0answers
7 views

How to unlink/remove files and images from s3 bucket using nmp papercut?

Can anyone please tell me how do I remove/erase/unlink images/files from amazon s3 storage using npm papercut https://www.npmjs.org/package/papercut I have successfully uploaded images/files by ...
0
votes
0answers
13 views

node.js - Best way to handle multiple db connections?

I have a central app connecting to multiple mysql servers. The connections are opened for queries several times a day (in parallel) via node-scheduling to collect some data. So, i wrote a small ...
0
votes
0answers
6 views

Setting MS references via gyp

I need to compile something with gyp. I make use of some windows APIs, so I need to add the following lines to my vcxproj-file <ItemGroup> <Reference Include="System" /> ...
0
votes
1answer
18 views

how to use model object in other file created in node orm

model created for user in user.js var orm = require("orm"); orm.connect("mysql://root:@localhost/axi_timescape", function (err, db) { if (err) throw err; var user = db.define("axi_users", { ...
0
votes
1answer
11 views

Socket.io 1.0 - Event to room only broadcastet, I want to emit to everyone (including sender)

according to the new docs: simply use to or in (they are the same) when broadcasting or emitting: io.to('some room').emit('some event'); And it works like expected in a context like ...
0
votes
1answer
10 views

sails connect to postgres

my adapter looks like this config/connections.js herokuPG: { adapter: 'sails-postgresql', url: 'process.env.DATABASE_URL', pool: false, ssl: false } package.json { "name": ...
0
votes
0answers
8 views

JBoss 6, Node.JS application stress tests

I am doing stress tests of web application with the following architecture: client side is developed in AngularJS partials are served from Node.JS server Node.JS uses Redis store to persist session ...
1
vote
0answers
17 views

Node Express Consolidate Hogan - Inconsistent error when compiling partials

I updated my application from older libs to the newest one but I encounter an inconsistent error. My libs : npm list --depth=0 ├── [email protected] ├── [email protected] ├── [email protected] ...
0
votes
0answers
14 views

How to convert MSSQL datetime integer to YYYY-mm-DD format in JavaScript [duplicate]

I get data from legacy API where there is a field 'opendate': 1086652416 99% that this is datetime format from MSSQL and it should be 24/06/2014 from early results: 1066467328 is 2011-12-15, ...
0
votes
0answers
28 views

error “define is not defined” startup Istanbul

There is a project on "JavaScript" + "Node.JS" + "Ant". Tests for JavaScript-code written in "Karma" + "Jasmine". To assess the code coverage using "Istanbul". The command: istanbul cover ...
0
votes
0answers
7 views

How to debug by jasmine node without node inspector

I am using jasmine node for testing and I want to put a debugger. Because I am in a remote box via ssh, I can't use node inspector. What is my options? Possible duplication: Debugging jasmine-node ...
0
votes
0answers
13 views

Why is Transfer-Encoding chunked in headers even when the connection is terminated?

We have observed When requesting files to node server, it sets the Transfer-Encoding : chunked http headers in the ouput. I understand that the node server sends so, because it has no idea about what ...
0
votes
0answers
4 views

Grunt Contrib Compass Error on Mac Osx and rbenv

I'm on Mac Os 10.6, I'm using the Yeoman Angular Generator and within the Package.json there are grunt-contrib-compass and grunt-contrib-watch. I have installed rbenv, compass and sass and the ...
0
votes
1answer
15 views

How to export chunk in http.request in node.js

This http.request code is from http://nodejs.org/docs/v0.4.7/api/http.html#http.request. How to export chunk in res.on ? var options = { host: 'www.google.com', port: 80, path: '/upload', ...
0
votes
0answers
18 views

Why Node.js in Phonegap

I've seen that Node.js is a mandatory component to make Phonegap work. What does it exactly do and whats the role of node.js in the phonegap architecure?
0
votes
2answers
34 views

The function does not return a proper array

The first console.log displays the array correctly but when I call it from outside it displays a pair of empty curly braces. var tofind = function (){ var userss = []; user.find(function ...
0
votes
2answers
11 views

Wildcard route in restify

coming from express I have routes like server.get('/some/route/*', function(req, res) { // accessing wildcard console.log(req.params[0]); }); How does a wildcard route like this look in ...
0
votes
0answers
13 views

How do I find documents and filter on subdocuments in mongodb

in my mongoose app I got 3 schemes like this: Match var MatchSchema = new Schema({ venue: { type: String, required: true}, track: { type: String, required: true}, players: ...
0
votes
1answer
17 views

Mongoose - accessing nested object with .populate

Schema Definitions Team.js var TeamSchema = new Schema({ // Team Name. name: String, lead: String, students :type: [{ block : Number, status : String, student : { ...
0
votes
0answers
3 views

Error:child-process throws error while using “xelatex” in node.js

When I am using xelatex to create pdf in node.js, it throws error. "error: uncaughtException: spawn ENOENT". Here is code fs.writeFile('filename.tex', 'contents of the file'); spawn('xelatex', ['', ...
1
vote
2answers
9 views

“bower install underscore” getting error in node.js

"bower install underscore" getting error bower ENOGIT git is not installed or not in the path I want to use static resources in node.js website so I am installing underscore using bower ...
0
votes
0answers
7 views

forever --watchDirectory for every 5min

Is there any possibility to run forever npm package watch for every 5min. Please suggest any solution for this problem. forever npm package option to run --watchDirectory and --watch but look for ...
0
votes
0answers
3 views

Access ShareJS metadata from DerbyJS

DerbyJS uses ShareJS for its data synchronization. ShareJS stores various metadata values, as you can see here: { "id" : "ABCDEFG12345", "_type" : "http://sharejs.org/types/JSONv0", "_v" : 3, "_m" : ...
0
votes
0answers
13 views

using winstonjs with external transports

after a lot of research and trial and error I finally understood where winston is giving me trouble. the setup is something like: server.js winston = require('winston'), Sentry = ...
1
vote
0answers
15 views

Timing out on a receive in zeromq javascript

I'm new with node-js programming, so perhaps I'm not seeing something obvious. A receive in zmq is as follows: socket.on('message', function() { console.log("Message received: "); ...
0
votes
0answers
13 views

Require Mongodb connection before or after Express.?

Is it recommended that a connection to Mongodb be placed before or after requireing express. I read the following quote from the book Mongoose For Application Development. We are simply going to ...
0
votes
0answers
11 views

How to check request origin

I have the below node server running in 3000 port. //File1.js var express = require("express"); var app = express(); //app.use(express.bodyParser()); app.get('/samp', function(req, res){ ...
0
votes
0answers
8 views

adding container div to Jade mixin

I am trying to add a wrap around the h2 & p tags called .desc in the post mixin of keystonejs. But everytime I add this I get the following err: Sorry, an error occurred loading the page (500) ...
-1
votes
0answers
10 views

strongloop port 3000 not working

i have three servers. my loopback on my 1st and 2nd server is working. but on my third server. it doesn't work anymore. when i go to the explorer (e.g localhost:3000/explorer) it doesnt work anymore. ...
0
votes
1answer
10 views

How to configure package.json to add a “self compiled binary” as a dependency?

I am very new to the concept of npm-install. Please throw some insights into where I might be going wrong. I have a .js file through which I am supposed to invoke a binary with some command line ...
0
votes
0answers
3 views

Application gets slow when I change server.js file Openshift

This is the first time, I'm asking a question here, so this's the issue I'm having, I created a node app in openshift, I connected through SSH, and I was able to push my code and i could change the ...