Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: whoamicz/express-treerouter
base: 5ca094e074
...
head fork: whoamicz/express-treerouter
compare: b9d0b4e6ed
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 8 additions and 2 deletions.
  1. +7 −1 README.md
  2. +1 −1  package.json
View
8 README.md
@@ -11,6 +11,7 @@ Easy way for using tree routes in Express.js
### Create this
app.use(treeRouter({
+ '' : { get: controller },
'products': { get: controller, post: controller, content: {
':product_id': { get: controller, put: controller, del: controller, content: {
'tags': { get: controller, post: controller, content: {
@@ -23,11 +24,14 @@ Easy way for using tree routes in Express.js
':owner_id': { get: controller, put: controller, del: controller }
}}
}}
- }}
+ }},
+ '*' : { all: error404Controller }
}));
### From this
+ app.get('/', controller);
+
app.get('/products', controller);
app.post('/products', controller);
app.get('/products/:product_id', controller);
@@ -51,4 +55,6 @@ Easy way for using tree routes in Express.js
app.get('/products/:product_id/owners/:owner_id', controller);
app.put('/products/:product_id/owners/:owner_id', controller);
app.del('/products/:product_id/owners/:owner_id', controller);
+
+ app.all('*', error404Controller);
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "express-treerouter",
- "version": "0.1.4",
+ "version": "0.2.0",
"description": "Easy way for using tree routes in Express.js",
"keywords": [
"treeRouter",

No commit comments for this range

Something went wrong with that request. Please try again.