Is it reasonable to put nginx in front of nodejs to serve static assets?

Is it reasonable to put nginx in front of nodejs to serve static assets?

DNS: How do resource records work for an Authoritative DNS server?

But please bear with me. I do not need help with ndns or JavaScript. I need help with DNS Resource Records. I can already send resource records. I just need to know how to send the right ones for an Authoritative DNS Server. I am writing the DNS server using ndns. Ndns is supposed to […]

how to setup nodejs webapp as service?

I have nodejs installed, npm installed, modules installed, and my app codes. On my dev machine I simply type node app.js in my app folder to start the dev server, but now it’s the time to deploy it to a real server I got problem. Where is the regular folder to place my app codes. […]

node.js with socket.io under debian 5 (lenny) exit with error

I installed node.js with the instructions from node.js wiki. So I put the debian sid sources in my sources list and installed node. After that I installed npm with the curl cmd from wiki site. I installed socket.io with npm. Everything till this point works without any errors. But when I try to start my […]

http.Server doesn't have addListener in node.js? It isn't a event emitter?

I am just beginning to play around with node.js and was looking through the documentation. This code doesn’t even run: var http = require(‘http’); http.createServer(function (req, res) { res.writeHead(200, {‘Content-Type’: ‘text/plain’}); res.end(‘Hello Node.js\n’); }).listen(80, “127.0.0.1”); http.Server.addListener(‘request’, function(req,res){ console.log(req.headers); }); console.log(‘Server running at http://127.0.0.1’); I am trying to add a listener to the server object for […]

Mongoose joining data

If I have an object in my MongoDB that will need to be used EVERYWHERE in my system, so it is in its own collection. However, I con’t quite figure out how to get the data to show up automatically on the other objects it is joined to. Here is an example: Schema1 = { […]

socket.emit in a simple TCP Server written in NodeJS?

[as you’ll see, I don’t understand the basic concepts of a TCP server and client very well and probably socket.emit is not even possible, but I’d like to know the best alternative or similar thing…] Socket.io has a beautiful thing to emit events and catch them on the other side, it’s in it’s first page […]

Socket.io startup output kills Upstart script for node.js daemon

I have a Node script that uses Socket.io to broadcast messages to connected clients. I want to run it as a background process with an Upstart script. I can start the daemon with sudo start my_server and the process will start and run. However, the server is stopped immediately by Socket.io’s standard output ‘info – […]

Node.js on Heroku: PostgreSQL on prod, SQLite3 on dev?

I have a Node.js/Rails3 app that I’m hosting on Heroku. The rails portion seamlessly switches between PostgreSQL and SQLite3 when it’s run on my local machine or the remote production box. Locally, the rails framework connects to SQLite3 as defined in config/databases.yml and when I push to Heorku, the deploy scripts overwrite this with their […]

mongodb river for elasticsearch

Is there any official mongodb river available for elasticsearch ? I am using mongodb in node.js through the module mogoose. I have seen one in http://www.matt-reid.co.uk/blog_post.php?id=68 Is this the correct one ? It says unofficial though… Edit: looks like, https://github.com/aparo/elasticsearch has inbuilt mongodb plugin.. Is there any doc available about how to configure this with […]

Node.js is the Best Javascript runtime in the world.