background preloader

Connect - middleware framework for nodejs

Connect - middleware framework for nodejs
Connect is a middleware framework for node,shipping with over 18 bundled middleware and a rich selection of3rd-party middleware. var app = connect() .use(connect.logger('dev')) .use(connect.static('public')) .use(function(req, res){ res.end('hello world\n'); }) http.createServer(app).listen(3000); Installation: $ npm install connect Middleware: Links:

Related:  node.js

A Simple Blog with CouchDB, Bogart, and Node.js Static Version Update: By request I have posted a gist of the app.js using MongoDB instead of CouchDB. This gist also serves as a beginning example for how to use non-promise-based APIs with bogart. In this article, you will learn how to use Bogart and CouchDB to create a minimal blogging engine.

mongoDB Many-to-Many Relationship Data Modeling - Mark Starkman Introduction Implementing a many-to-many relationship in a relational database is not as straight forward as a one-to-many relationship because there is no single command to accomplish it. The same holds true for implementing them in mongoDB.

Event loop When the event loop forms the central control flow construct of a program, as it often does, it may be termed the main loop or main event loop. This title is appropriate because such an event loop is at the highest level of control within the program. Message passing[edit] Alternative designs[edit] This approach is in contrast to a number of other alternatives: Traditionally, a program simply ran once then terminated.

Essential Sublime Text 2 Plugins and Extensions Sublime Text 2 is a relatively new code editor that I've been trying out for a while now. While it's still in public beta, it already offers a great mix of features and performance that has convinced me to switch from my trusted Komodo. While I really do love the features available out of the box, as with most things in life, there is always room for more.

Kue Kue is a feature rich priority job queue for node.js backed by redis. A key feature of Kue is its clean user-interface for viewing and managing queued, active, failed, and completed jobs. At any point in the job's life-time you can view verbose details, including the job's arbitrary data, creation, update, failure, and completion times. Jobs may incrementally update their progress, providing vital feedback for long-running tasks.

Parse data files using Node.js streams - Nicolas Hery 09 July, 2013 In this post I explain how I used Node.js streams to parse and transform data text files. Streams and pipes are an important part of the Unix philosophy: A Simple Website in Node.js with Express, Jade and Stylus by Ben Gourley Do you feel like you've missed the boat on Node? Perhaps you're not a superstar web app developer, but a humble builder of websites. Maybe you're a fledging front-end developer: you've got your head around JavaScript and you want to build a site yourself, but you don't know PHP, Python or Ruby. Fear not. This post will use the popular Express framework to show you how you can build simple websites in Node.

Just-in-time compilation Applications[edit] A common implementation of JIT compilation is to first have AOT compilation to bytecode (virtual machine code), known as bytecode compilation, and then have JIT compilation to machine code (dynamic compilation), rather than interpretation of the bytecode. This improves the runtime performance compared to interpretation, at the cost of lag due to compilation.

Related:  Modules