background preloader

Node.js

Facebook Twitter

Hosting Node.js and MongoDB. After digging into web development with Node.js the last couple of months I had to choose where to host this blog, which I had decided to rewrite and run with Node as a result of my research.

Hosting Node.js and MongoDB

To be honest, I’ve been surprised there is no real ecosystem of (shared) hosting providers offering Node.js and MongoDB (which often is the obvious choice when developing a node application) on the cheap. There are some providers like nodejitsu for Node.js and mongolab for MongoDB - but there is no fully integrated experience as you would expect it coming from the LAMP world or even ASP.NET. So it seemed to be a Do-it-yourself-world. Challenge accepted! :-) Requirements My personal requirements were: Run Node.js and MongoDB (or any other database) side-by-side. Option 1: Run your own physical machine I always trusted Hetzner as their dedicated servers are not only cheap but also powerful and reliable.

Hetzner also offers free 100 GB backup space for each dedicated server. Conclusion. Node.js : mais à quoi ça sert ? Karma - Spectacular Test Runner for Javascript. Export This: Interface Design Patterns for Node.js Modules. When you require a module in Node, what are you getting back?

Export This: Interface Design Patterns for Node.js Modules

When you write a module, what options do you have for designing its interface? When I was first learning to work in Node I found the sheer number of ways to do things to be a bit overwhelming. JavaScript is extremely flexible and the community of developers contributing to open source seem to have different styles for implementing the same thing.

On my journey with Node I've been keeping an eye out the Good Way to do things and adopting them for use in my own work and in our work at Good Eggs. In this post I'll share my observations of the Node module system and the ways in which you can use it to encapsulate and share code. I discuss seven patterns below, many of which can be used in combination. Require, exports and module.exports First some fundamentals. In Node requiring a file is requiring the module it defines. It's as if there were an implicit line at the beginning of each module that reads: and require it with: Export Away! Migrating from 2.x to 3.x · visionmedia/express Wiki. Removed Changed req.header(field[, defaultValue]) replaced by req.get(field) (remains for backwards compatibility)res.header(field[, value]) replaced by res.set(field, value) / res.get(field) (remains for backwards compatibility)renamed app.register() to app.engine()template engine compliance from engine.compile(str, options) => Function to engine.

Migrating from 2.x to 3.x · visionmedia/express Wiki

__express(filename, options, callback)express.createServer() is now simply express() (but remains for BC). Keep in mind that the return value of express() is no longer an http.Server instance. (See the Application function section below for more details) View options Application function The return value of express() is a JavaScript Function, encapsulating everything that makes an Express app tick. ...var app = express();http.createServer(app).listen(80);https.createServer(options, app).listen(443); For convenience, and smaller applications the app.listen() method takes the same arguments, wrapping in an HTTP server.

And Socket.IO compatibility. Npm. Jade templating engine. Express - node.js web application framework. Node.js. The Node Beginner Book » A comprehensive Node.js tutorial. How To Node - NodeJS.