Skip to content

Commit

Permalink
fixed README
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbe committed Apr 18, 2015
1 parent a284238 commit ea1c68f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ npm install named-routes

### Example
#### As a replacement for express framework router
// in the view files:
In the view files:
```js
url('admin.user.edit', {id: 2}) // /admin/user/2
```

//... and in the server config
... and in the server config:
```js
var express = require('express');
var app = express();
Expand All @@ -45,6 +45,7 @@ app.get('/admin/user/:id', 'admin.user.edit', function(req, res, next){
// the names can also be accessed here:
var url = app.namedRoutes.build('admin.user.edit', {id: 2}); // /admin/user/2
});
```

#### As a standalone

Expand Down

0 comments on commit ea1c68f

Please sign in to comment.