Skip to content

Commit

Permalink
add upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
geta6 committed Nov 16, 2013
1 parent 9637b92 commit c3e1149
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Expand Up @@ -59,13 +59,33 @@
* setup interface
* internal behavior

### example
### interface example

```
```coffee
app.use require 'connect-stream' # old
app.use (require 'connect-stream')() # new
```

### behavior example

```coffee
app.use (require 'connect-stream') path.resolve('public'),
concatenate: 'join' # default

app.get (req, res) ->
res.stream '/tmp/a.mp4' # old, always stream "/tmp/a.mp4"
# new, stream from "public/tmp/a.mp4" (path.join (path.resolve 'public'), '/tmp/a.mp4')
```

```coffee
app.use (require 'connect-stream') path.resolve('public'),
concatenate: 'resolve'

app.get (req, res) ->
res.stream '/tmp/a.mp4' # old, always stream "/tmp/a.mp4"
# new, stream from "/tmp/a.mp4" (path.resolve 'public', '/tmp/a.mp4')
```

## feature

### gzip
Expand Down

0 comments on commit c3e1149

Please sign in to comment.