Skip to content

Commit 5bd09a7

Browse files
authored
Merge pull request #5 from mhulse/334-router-class-fix
Fixing README so it points to the right Router class path
2 parents ef01ceb + f31c2f3 commit 5bd09a7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Tarantino handles routing for HTTP requests similar to `journey` or `express`:
190190
//
191191
// define a routing table.
192192
//
193-
var router = new tarantino.http.Router({
193+
var router = new tarantino.Router({
194194
'/hello': {
195195
get: helloWorld
196196
}
@@ -339,7 +339,7 @@ adhoc routing:
339339
**HTTP Routing**
340340

341341
``` js
342-
var router = new tarantino.http.Router();
342+
var router = new tarantino.Router();
343343

344344
router.get(/\/some\/resource/, function () {
345345
//
@@ -356,7 +356,7 @@ resources. Tarantino exposes a simple way to do this for [Adhoc
356356
Routing](#adhoc-routing) scenarios:
357357

358358
``` js
359-
var router = new tarantino.http.Router();
359+
var router = new tarantino.Router();
360360

361361
//
362362
// Create routes inside the `/users` scope.
@@ -510,7 +510,7 @@ simple example where a `userId` is used repeatedly.
510510
``` js
511511
//
512512
// Create a router. This could also be tarantino.cli.Router() or
513-
// tarantino.http.Router().
513+
// tarantino.Router().
514514
//
515515
var router = new tarantino.Router();
516516

@@ -668,7 +668,7 @@ callback.
668668
### Asynchronous route functions
669669

670670
``` js
671-
var router = new tarantino.http.Router().configure({ async: true });
671+
var router = new tarantino.Router().configure({ async: true });
672672

673673
router.on('/:foo/:bar/:bazz', function (foo, bar, bazz, next) {
674674
//
@@ -733,7 +733,7 @@ route handlers, will contain the request in `this.req` and the response in
733733
```js
734734
var tarantino = require('tarantino');
735735

736-
var router = new tarantino.http.Router().configure(options);
736+
var router = new tarantino.Router().configure(options);
737737

738738
//
739739
// Attach properties to `this`
@@ -767,7 +767,7 @@ When you are performing HTTP routing there are two common scenarios:
767767
* Stream the request body by manually calling `.pipe` or listening to the
768768
`data` and `end` events.
769769

770-
By default `tarantino.http.Router()` will attempt to parse either the `.chunks`
770+
By default `tarantino.Router()` will attempt to parse either the `.chunks`
771771
or `.body` properties set on the request parameter passed to
772772
`router.dispatch(request, response, callback)`. The router instance will also
773773
wait for the `end` event before firing any routes.
@@ -777,7 +777,7 @@ wait for the `end` event before firing any routes.
777777
``` js
778778
var tarantino = require('tarantino');
779779

780-
var router = new tarantino.http.Router();
780+
var router = new tarantino.Router();
781781

782782
router.get('/', function () {
783783
//
@@ -800,7 +800,7 @@ you can use a simple request handler in your http server:
800800
var http = require('http'),
801801
tarantino = require('tarantino');
802802

803-
var router = new tarantino.http.Router();
803+
var router = new tarantino.Router();
804804

805805
var server = http.createServer(function (req, res) {
806806
req.chunks = [];
@@ -832,7 +832,7 @@ fired, you can pass the `{ stream: true }` options to the route.
832832
``` js
833833
var tarantino = require('tarantino');
834834

835-
var router = new tarantino.http.Router();
835+
var router = new tarantino.Router();
836836

837837
router.get('/', { stream: true }, function () {
838838
//

0 commit comments

Comments
 (0)