Permalink
Browse files

[doc dist] Update README.md LICENSE and package.json. `flatiron-http`…

… is now `union`.
  • Loading branch information...
1 parent 77dfb06 commit 0083f8b0d73067feaca9bd98e73cccc4cf241b9b @indexzero indexzero committed Nov 9, 2011
Showing with 88 additions and 3 deletions.
  1. +19 −0 LICENSE
  2. +66 −0 README.md
  3. +3 −3 package.json
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Nodejitsu Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -0,0 +1,66 @@
+# union
+
+A hybrid buffered / streaming middleware kernel backwards compatible with connect.
+
+## Example
+
+``` js
+var fs = require('fs'),
+ union = require('../lib'),
+ sugarskull = require('sugarskull'),
+ favicon = require('./middleware/favicon');
+
+var router = new sugarskull.http.Router();
+
+var server = union.createServer({
+ use: [favicon('./favicon.png'))],
+ router: router
+});
+
+router.get(/foo/, function () {
+ this.res.writeHead(200, { 'Content-Type': 'text/plain' })
+ this.res.end('hello world\n');
+});
+
+router.post(/foo/, { stream: true }, function () {
+ var req = this.req,
+ res = this.res,
+ writeStream;
+
+ writeStream = fs.createWriteStream(Date.now() + '-foo.txt'))
+ req.pipe(writeStream);
+
+ writeStream.on('close', function () {
+ res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.end('wrote to a stream!');
+ });
+});
+
+server.listen(8080);
+console.log('union with sugarskull running on 8080');
+```
+
+## Installation
+
+### Installing npm (node package manager)
+``` bash
+ $ curl http://npmjs.org/install.sh | sh
+```
+
+### Installing union
+``` bash
+ $ [sudo] npm install union
+````
+
+## Tests
+All tests are written with [vows][0] and should be run with [npm][1]:
+
+``` bash
+ $ npm test
+```
+
+#### Author: [Charlie Robbins](http://nodejitsu.com)
+#### License: MIT
+
+[0]: http://vowsjs.org
+[1]: http://npmjs.org
View
@@ -1,7 +1,7 @@
{
- "name": "flatiron-http",
- "description": "The http 'middleware' component used by, but decoupled from flatiron",
- "version": "0.0.0",
+ "name": "union",
+ "description": "A hybrid buffered / streaming middleware kernel backwards compatible with connect.",
+ "version": "0.0.1",
"author": "Nodejitsu Inc. <info@nodejitsu.com>",
"contributors": [
{ "name": "Charlie Robbins", "email": "charlie.robbins@gmail.com" }

0 comments on commit 0083f8b

Please sign in to comment.