background preloader

Connect

Connect
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:

emailjs Express - api reference express() Create an express application. var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('hello world'); }); app.listen(3000); Application settings The following settings are provided to alter how Express will behave: env Environment mode, defaults to process.env.NODE_ENV (NODE_ENV environment variable) or "development"trust proxy Enables reverse proxy support, disabled by defaultjsonp callback name Changes the default callback name of ? app.set(name, value) Assigns setting name to value. app.set('title', 'My Site'); app.get('title'); app.get(name) Get setting name value. app.get('title'); app.set('title', 'My Site'); app.get('title'); app.enable(name) Set setting name to true. app.enable('trust proxy'); app.get('trust proxy'); app.disable(name) Set setting name to false. app.disable('trust proxy'); app.get('trust proxy'); app.enabled(name) Check if setting name is enabled. app.enabled('trust proxy'); app.enable('trust proxy'); app.enabled('trust proxy');

UglifyJS Modules ยท joyent/node Wiki This page is deprecated. Feel free to add to it, but be advised that it is, at best, a faded relic of Node modules that were written before npm was a dominant force in the Node.js ecosystem. It is not all that useful any more. If you are a newcomer, it can be handy to at least get a starting point. However, note that there are many tens of thousands of modules in the npm registry, and only just under 2,000 modules here. So, this list is long enough to be intimidating, but still only captures a tiny sliver of the Node.js modules you can use with your program. Search for modules with npmjs.org, node-modules, and nipster. The archaic contents of this once-useful page now follow. Adding to this page When you add a framework to this page, have a look at how others have done so, it should be a single item, with a link to the project's source code, and a short description (one line after formatting has been applied). Table of contents Modules Web frameworks Routers Static file servers Microframeworks

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. With the UI's action panel you can filter jobs by type and alter sorting at any time.

Node Roundup: Fowl, grunt-ec2, connect-body-rewrite Fowl Fowl (GitHub: OptimalBits / fowl, License: MIT, npm: fowl) by Manuel Astudillo is a document and query layer for FoundationDB. It provides a similar API to NoSQL databases like MongoDB, but has support for multidocument transactions: Transaction support is an incredibly powerful feature that simplifies server logic and helps avoiding difficult to solve race conditions. Fowl provides a low level API based on keypaths for describing documents and its properties following CRUD semantics. It includes tests and each API method is documented in the readme file. grunt-ec2 grunt-ec2 (GitHub: bevacqua / grunt-ec2, License: MIT, npm: grunt-ec2) by Nicolas Bevacqua is a set of Grunt tasks for creating, terminating, and deploying Node applications to AWS EC2 instances. The deployed Node applications are served from behind an Nginx proxy. connect-body-rewrite

ursa Passport | Overview Passport is authentication middleware for Node. It is designed to serve a singular purpose: authenticate requests. When writing modules, encapsulation is a virtue, so Passport delegates all other functionality to the application. This separation of concerns keeps code clean and maintainable, and makes Passport extremely easy to integrate into an application. In modern web applications, authentication can take a variety of forms. Passport recognizes that each application has unique authentication requirements. Despite the complexities involved in authentication, code does not have to be complicated. Install $ npm install passport Authenticating requests is as simple as calling passport.authenticate() and specifying which strategy to employ. authenticate()'s function signature is standard Connect middleware, which makes it convenient to use as route middleware in Express applications. Note: Strategies must be configured prior to using them in a route. Redirects Flash Messages Disable Sessions

Related: