OLD | NEW |
1 ## Web Server Middleware for Dart | 1 ## Web Server Middleware for Dart |
2 | 2 |
3 [![Build Status](https://travis-ci.org/dart-lang/shelf.svg?branch=master)](https
://travis-ci.org/dart-lang/shelf) | 3 [![Build Status](https://travis-ci.org/dart-lang/shelf.svg?branch=master)](https
://travis-ci.org/dart-lang/shelf) |
4 [![Coverage Status](https://coveralls.io/repos/dart-lang/shelf/badge.svg?branch=
master)](https://coveralls.io/r/dart-lang/shelf) | 4 [![Coverage Status](https://coveralls.io/repos/dart-lang/shelf/badge.svg?branch=
master)](https://coveralls.io/r/dart-lang/shelf) |
5 | 5 |
6 ## Introduction | 6 ## Introduction |
7 | 7 |
8 **Shelf** makes it easy to create and compose **web servers** and **parts of web | 8 **Shelf** makes it easy to create and compose **web servers** and **parts of web |
9 servers**. How? | 9 servers**. How? |
10 | 10 |
11 * Expose a small set of simple types. | 11 * Expose a small set of simple types. |
12 * Map server logic into a simple function: a single argument for the request, | 12 * Map server logic into a simple function: a single argument for the request, |
13 the response is the return value. | 13 the response is the return value. |
14 * Trivially mix and match synchronous and asynchronous processing. | 14 * Trivially mix and match synchronous and asynchronous processing. |
15 * Flexibliity to return a simple string or a byte stream with the same model. | 15 * Flexibility to return a simple string or a byte stream with the same model. |
16 | 16 |
17 ## Example | 17 ## Example |
18 | 18 |
19 See `example/example_server.dart` | 19 See `example/example_server.dart` |
20 | 20 |
21 ```dart | 21 ```dart |
22 import 'package:shelf/shelf.dart' as shelf; | 22 import 'package:shelf/shelf.dart' as shelf; |
23 import 'package:shelf/shelf_io.dart' as io; | 23 import 'package:shelf/shelf_io.dart' as io; |
24 | 24 |
25 void main() { | 25 void main() { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 ``` | 149 ``` |
150 | 150 |
151 ## Inspiration | 151 ## Inspiration |
152 | 152 |
153 * [Connect](http://www.senchalabs.org/connect/) for NodeJS. | 153 * [Connect](http://www.senchalabs.org/connect/) for NodeJS. |
154 * Read [this great write-up](http://howtonode.org/connect-it) to understand | 154 * Read [this great write-up](http://howtonode.org/connect-it) to understand |
155 the overall philosophy of all of these models. | 155 the overall philosophy of all of these models. |
156 * [Rack](http://rack.github.io/) for Ruby. | 156 * [Rack](http://rack.github.io/) for Ruby. |
157 * [WSGI](http://legacy.python.org/dev/peps/pep-3333/) for Python. | 157 * [WSGI](http://legacy.python.org/dev/peps/pep-3333/) for Python. |
OLD | NEW |