node.js

Joyent vs Heroku for Node.js?

Has anyone used both Joyent and Heroku and could share your thoughts about each one of them? First I used Heroku with Rails but since I switched to Node.js in the backend I haven't made up my mind where to host my future node applications. It seems that the best candidates are Joyent and Heroku. Heroku has closed it's Node.js registra...

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? ...

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 node app.js everything is working fine and "process.cwd()" return the good path. But when the script is started with upstart or even direct...

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 using connect/express frameworks on node and I think they allow smart caching etc, but I am not sure which bits to let ngnix do and which bits...

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 over the other? ...

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? ...

Nube with nodejs and mongodb

Hi there! 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() like this: db.open(function(err, db) { db.collection('users', function(err, collection) { collection.find({}, {'...

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 a anyone use a web server that has no compression? What am I missing here? Should I try togaspport the algorithm to JavaScript for server-side use? ...

Started Playing with node.js. I have a question

Hi, 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, {"Content-Type": "text/plain"}); response.end("Hello World!"); sys.puts('Connection'); }).listen(8080); sys.puts("Server runn...

How to get information about the client in node.js

Hi, in this very simple example: var sys = require("sys"), http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World!"); }).listen(8080); sys.puts("Server running at http://localhost:8080/"); 1.) What kind of information can ...

Real time website visitor tracking system

Hi, 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: 1.) Server side script, probably a node.js server. 2.) Air application would be the client. It will connect to the node.js server and display the users online. 3.) Javascrip...

New to Node.js. 3 basic questions!

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 collaborative application where you need to see what other users are doing. I want to explore that using NodeJS. I have couple of questions: ...

Differences between Narwhal and Node.js?

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, should/could I use Narwhal and it's libraries/modules? Aren't the libraries/modules in Narwhal IO-blocked (why Node.js got this huge popularity)? Is Node.js only for creating Web servers or is it for creatin...

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? ...

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? ...

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? ...

how to use http.client in Node.js if there are basic authorization

hi all, as title, how to do that? var http = require('http'); var client = http.createClient(80, 'www.example.com'); // to access this url i need to put basic auth. var request = client.request('GET', '/', {'host': 'www.example.com'}); request.end(); request.on('response', function (response) { console.log('STATUS: ' + response.st...

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, res) { var path = url.parse(req.url).pathname; if (path[path.length - 1] == '/') { path += 'index.html'; } fs...

XSLT libray for v8/Node.js

After some quick Googling, 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 support for parsing XML documents, and manipulating them with DOM. I'm wondering if anyone is aware of an XSLT ...

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 into mongodb after processing (language/template). I'm considering writing a small daemon which will check for new messages in mongo every...