Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
548 views

Is this a mal-formed http request from an iPad, which kills Node.js multipart parser

The below code is used in an iPad app to send an HTTP request to a Node.js web server, which produces the following error, but works fine w/ a regular HTML+browser form. The server is Node.js + ...
roder's user avatar
  • 566
39 votes
1 answer
29k views

How to create appending writeStream in Node.js

Current documentation here doesn't seem to mention any parameters governing the stream's behaviour with regards to whether file is re-created every time or just gets data appended. Is there a way to ...
Art's user avatar
  • 24.4k
3 votes
4 answers
2k views

Javascript OOP library for client and server-side js (node.js)

is there any Javascript OOP library to easily work with classes, inherence and the like in a more class-based way to avoid prototypical OOP that works with JS both on the client (browser) and on the ...
pistacchio's user avatar
  • 58.5k
23 votes
5 answers
17k views

Is it possible to develop a Google App Engine web app using Node.js or some other server side JavaScript approach?

I've been following the latest developments with server-side JavaScript - especially Node.js - and wondering if there is any possibility of using such an approach to develop a Google App Engine web ...
Michael O'Faolain's user avatar
1 vote
1 answer
469 views

MongoDB console javascript can't be used in application?

At the MongoDB developer zone you can learn all the MongoDB console javascript API to use for document CRUD operations. I wonder, do all these javascript functions only work on the MongoDB console? ...
never_had_a_name's user avatar
177 votes
8 answers
311k views

Share variables between files in Node.js?

Here are 2 files: // main.js require('./module'); console.log(name); // prints "foobar" // module.js name = "foobar"; When I don't have "var" it works. But when I have: ...
never_had_a_name's user avatar
9 votes
2 answers
9k views

Share variables between modules in Javascript/node.js?

I have 3 node files: // run.js require('./configurations/modules'); require('./configurations/application'); // modules.js var express = module.exports.express = require('express'); var app = ...
never_had_a_name's user avatar
15 votes
1 answer
1k views

JavaScript Design Patterns -- Dealing With Unwanted Asynchrony

I'm pretty new to event-based programming (using node.js). I believe that there's something I'm just not grokking about it, because there's a particular problem that I keep coming across again and ...
hanksims's user avatar
  • 1,499
3 votes
2 answers
1k views

JSpec no longer supported?

Coming from the Ruby community I'm looking for a BDD-testing framework for Javascript/Node.js. I was JSpec and thought it would be the right choice because I used RSpec in Ruby. But on their GitHub ...
never_had_a_name's user avatar
4 votes
3 answers
7k views

Node.JS Looking for an alternative to socket.IO

I've been testing Node.JS and Socket.IO for a couple of days. I'm interested in a real-time application that's why I'm testing Socket.IO, problem is I found many problems on several browsers. Chrome ...
oscarm's user avatar
  • 2,650
1 vote
1 answer
376 views

Development VPS where environment (Ruby/Rails, JavaScript/Node.js etc) is pre-installed?

Until now I'm setting up my own development environment with Vagrant/VirtualBox/Chef (Ruby). I wonder if there is a hosting company that provides pre-configured VPS for... Ruby/Rails Javascript/Node ...
never_had_a_name's user avatar
1 vote
1 answer
1k views

mail daemon on java

I need to create something like mail daemon on java or node.js We have a highload project written on PHP which generates a lot of e-mail registrations/updates/etc. Currently all messages are being put ...
nateless's user avatar
  • 485
5 votes
0 answers
6k views

XSLT library for v8/Node.js [closed]

I found that there are some XML libraries available for v8/Node.js: http://github.com/ry/node/wiki/modules#parsers-xml However, after drilling down into these modules, it seems that they only provide ...
jbeard4's user avatar
  • 12.8k
6 votes
5 answers
5k views

Node.js cuts off files when serving over HTTPS

I am trying to serve some JavaScript files with Node.js and for whatever reason the files are being cut off in the middle of the transmission. The code: httpsServer = http.createServer(function(req, ...
ipartola's user avatar
  • 1,640
126 votes
10 answers
211k views

How to use http.client in Node.js if there is basic authorization

As per title, how do I do that? Here is my code: var http = require('http'); // to access this url I need to put basic auth. var client = http.createClient(80, 'www.example.com'); var request = ...
de_3's user avatar
  • 3,439
58 votes
7 answers
41k views

Difference between console.log and sys.puts in node.js?

In node.js you can use console.log or sys.puts to print out to the screen. What is the preferred method and what is the difference between these?
never_had_a_name's user avatar
1 vote
2 answers
154 views

Creating modules to be required in other files in Javascript?

In Node.js I can use a module like this: sys = require("sys"); How do I create my own module like "sys" so that I can require it from other files?
never_had_a_name's user avatar
2 votes
2 answers
2k views

Jake on Node.js?

From what I have understood Jake (Rake equivalent for Javascript) is based on Rhino. Does this mean that I cannot use it with Node.js?
never_had_a_name's user avatar
35 votes
4 answers
9k views

Differences between Narwhal and Node.js [closed]

I'm new to Node.js and I have been reading about Narwhal that is a framework based on Rhino. My questions: If I'm using Node.js, could I use Narwhal and its libraries/modules? Aren't the libraries/...
never_had_a_name's user avatar
2 votes
1 answer
87 views

In node.js javascript why can't I add to a child function?

game_state = function(){ this.players = function() { this.x = 0; }; } game_state.players['test'] = 1; Why does this fail but game_state['test'] = 1; does not? I'm trying this in ...
user avatar
4 votes
2 answers
999 views

Nodejs networking - realtime communication

I'm new to node.js and I want to ask a simple question about how it works. I have used FMs in the past for client to client communication and real time applications. For example, for creating a ...
oscarm's user avatar
  • 2,650
2 votes
1 answer
12k views

Real time website visitor tracking system

I want to develop an application that allows me to track website visitors. I'm exploring node.js now as an alternative for this. This system will have 3 parts: Server side script, probably a node.js ...
oscarm's user avatar
  • 2,650
12 votes
3 answers
36k views

How to get information about the client in node.js

in this very simple example: var sys = require("sys"), http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); ...
oscarm's user avatar
  • 2,650
-1 votes
2 answers
127 views

Started Playing with node.js. I have a question

I just created a HTTP server using this code fro the documentation: var sys = require("sys"), http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {...
oscarm's user avatar
  • 2,650
110 votes
13 answers
141k views

Node.js: Gzip compression?

Am I wrong in finding that Node.js does no gzip compression and there are no modules out there to perform gzip compression? How can anyone use a web server that has no compression? What am I missing ...
SnickersAreMyFave's user avatar
-1 votes
1 answer
1k views

Using nodejs : mongodb find then add to Array

I made a simple db with a few users in it with mongodb and nodejs. Next im looping through the list and display the users in the list's names etc with sys.puts(). No I am adding the users to an Array(...
Harry's user avatar
  • 13.3k
2 votes
1 answer
1k views

High-level differences between node.js and ZeroMQ?

Excuse my ignorance, but what is the high-level overview of (something like) node.js versus ZeroMQ?
fogus's user avatar
  • 6,206
12 votes
3 answers
4k views

Advantages of Erlang over (something like) node.js?

I realize that they are different beast used to solve different problems, but I would like to ask for an enumerated list of advantages of Erlang over node.js (and vice-versa). When would you use one ...
fogus's user avatar
  • 6,206
1 vote
1 answer
796 views

using ngnix infront of node.js

I am using ngnix infront of 4 instances of node.js apps running on 1 machine (quad core) Can any ngnix experts give me any advice on how to configure this to get the most out of the web app. I am ...
fullstacklife's user avatar
5 votes
1 answer
2k views

CWD of an Node.js application started with upstart (Ubuntu)

I've coded an node.js app that when get executed need to return CWD from process to be able to read files on disk. When I start the app directly with node in the actual app directory... #!sh ...
plehoux's user avatar
  • 795
2 votes
4 answers
1k views

Node.js on Heroku?

I wonder if all Heroku addons - that are currently working for Rails - will work for Node.js once the support is there? And what is the ETA for the launch of Node.js support?
never_had_a_name's user avatar
60 votes
5 answers
46k views

What MySQL drivers are available for node.js? [closed]

Is there a Node.JS Driver for MySQL that is commonly used other than node-mysql? (It seems like there is not much activity with node.js database drivers. Is there a reason for this or is it just ...
Brad Barrows's user avatar
  • 1,713
3 votes
3 answers
1k views

nodejs (nodejs.org/) experience / comments [closed]

Has anyone experience with nodeJS? how about performance? memory management? I'm looking for a technology that allows me to create a real-time web app tracking system and a chat. If you considered ...
oscarm's user avatar
  • 2,650
1 vote
2 answers
4k views

Node.js return result of file

I'd like to make a node.js function that, when calls, reads a file, and returns the contents. I'm having difficulty doing this because 'fs' is evented. Thus, my function has to look like this: ...
So8res's user avatar
  • 10.2k
5 votes
2 answers
4k views

Suggestions for dealing with `exports` in node.js

Theory: One of the things that appeals to me about node.js is using it as a command line tool. In theory, I can write libraries in Javascript and place them in my ~/.node_libraries directory, and ...
user avatar
13 votes
3 answers
16k views

Any Easy to extend Web-based File Manager for node.js?

Want to find one and modify that to read, write file on mongoDB gridfs store
Eric Fong's user avatar
  • 815
0 votes
2 answers
1k views

Starting Node with God with sudo

I need to start a Node.js server as the root user (using sudo) with a start param that looks like: w.start = "sudo node #{KTHXBYE_NODE_ROOT}/poll.js" As I am using Socket.IO and need the use of ...
Lukas's user avatar
  • 3,205
168 votes
19 answers
325k views

How can I use an http proxy with node.js http.Client?

I want to make an outgoing HTTP call from node.js, using the standard http.Client. But I cannot reach the remote server directly from my network and need to go through a proxy. How do I tell node.js ...
Christian Berg's user avatar
4 votes
2 answers
2k views

node.js misconceptions? [closed]

From the node.js page Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems. so ...
hvgotcodes's user avatar
  • 120k
2 votes
1 answer
4k views

storing a mongoose (node.js orm) query result

Is there anyway to do something like: var first_user = User.find({ _id: user_id }).first(); using the mongoose ORM? http://github.com/LearnBoost/mongoose What I'm trying to do is to store the ...
K-2052's user avatar
  • 197
226 votes
7 answers
50k views

What is the Haskell response to Node.js?

I believe the Erlang community is not envious of Node.js as it does non-blocking I/O natively and has ways to scale deployments easily to more than one processor (something not even built-in in Node....
gawi's user avatar
  • 14.1k
1 vote
2 answers
1k views

Need help with riak-js

I'm a newbie with node.js and riak, trying to use riak-js. I wrote the following coffeescript, to create N entries with the squares of integers 1..N. The script works fine for N=10. If I put a console....
user402476's user avatar
3 votes
3 answers
11k views

Run JavaScript file in NetBeans/Eclipse?

Is there a way to run a JavaScript file directly in NetBeans or Eclipse? I feel it's time consuming to fire up a terminal, browse to that file and run it with node all the time.
never_had_a_name's user avatar
12 votes
5 answers
8k views

Is there a browserless websocket client for Node.js that does not need to use a browser?

Socket.IO, etc all require the using of browser on the client side....just wondering, how can we have browserless websocket client for node.js ?
haijin's user avatar
  • 948
1 vote
1 answer
754 views

Require() wrapper in node.js?

I try to include a .js file in my app with node require(), but get this error. Any idea? a.js : function a() { this.a = 'a'; } Node application : require("./a.js"); var test = new a(); Error: ...
plehoux's user avatar
  • 795
2 votes
1 answer
379 views

What is the scope of javascript callback and anonymous functions?

I have written the following code using node.js and riak-js. I have a recursive function walk that should be a list of JSON documents, but instead returns an empty list... why? how to fix? require('...
roder's user avatar
  • 566
0 votes
2 answers
845 views

iPhone and Node.js, multiple packets in single read

I feel like I'm doing this wrong, or it's just a result of my novice with sockets. I'm using asyncSocket on the iPhone to send data to node.js. My problem is that every so often, the app will hang, ...
Brent's user avatar
  • 23.6k
0 votes
2 answers
866 views

Node.js from localhost

I'm experimenting with nodejs on my localhost now. I do have a simple server host but I don't have SSH access etc. How can I share my work with people in this situation? Thanks, Tee
teepusink's user avatar
  • 28.5k
4 votes
3 answers
10k views

Download Tar File via NodeJS

I have two nodejs http servers, one requests a tar file from the other. It works fine via browser testing, but I can never get the second server to glue the chunks together correctly. My attempts ...
Logan Bailey's user avatar
  • 7,107
3 votes
1 answer
3k views

Socket.IO / Node.JS / Rails 3 / IE

This is a bit complicated but here goes. I have a Rails app that has a small JS widget that gets updated on some backend processing stuff. The Rails app queues up a job in Redis (via Kthxbye) which ...
Lukas's user avatar
  • 3,205