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. Pre-Requisites npm npm is the most popular package manager for Node.js. curl | sh A note for windows users: npm does not currently work on windows. Bogart Bogart is a Sinatra-like framework designed to make it easy to create JSGI compliant web applications for node.js. Bogart is in the npm registry. npm install bogart CouchDB CouchDB is a document-oriented database with a RESTful interface. Bogart is a JSGI-based framework. Mustache Mustache is a minimal templating engine with {{mustaches}}. CouchDB-CommonJS CouchDB-CommonJS is a promise-based CouchDB library available in the npm registry. npm install couchdb What will our application do? Lets get started! hello-world.js posts.html

The Simple Guide to Node.js Frameworks and Libraries - webdevRefinery Forum Node.js is new. Very, very new.Unlike languages like PHP, Ruby, and Python, development of frameworks and support libraries for Node.js is moving at the speed of light, with new, completely different patterns and bodies of code appearing literally on a daily basis. The sheer act of trying to choose which libraries your next webapp will be based on can be so daunting that you may never get to the development stage, so that's what this guide attempts to solve. I don't consider myself an expert, though, and I'm CERTAINLY not capable of keeping up on all the latest and greatest additions to the Node family myself, so if you see a new library worthy of being posted here, please leave it in a reply! I'm not attempting to list EVERY library here! Web FrameworksConnectWebsite and Documentation - GitHub - IntroductionConnect is considered a "middleware" framework, providing all the tools you'd need in a framework but letting the programmer arrange them however he sees fit. .

express - What is a good session store for a single-host Node.js production app nrstott/bogart - GitHub node.js - Using MemoryStore in production chetan51/ni - GitHub node.js - How to fix the connection.session issue 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: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. -- Doug McIlroy, inventor of Unix pipes and one of the founders of the Unix tradition This means that we can have small, focused programs that are easily assembled together to tackle more complex problems. This is also possible in Node.js thanks to the Stream interface, and its .pipe() method. I won't go over the general aspects of streams and pipes in Unix and Node.js. During one of my projects, I had to parse text files containing data from some "legacy" system in order to make it more usable and load it into a database. I thought this would be an ideal candidate for streams. The data file to parse Into this more usable format: A first basic stream Parse the CSV file

Related: