Skip to content

Commit

Permalink
add some more detail to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarkie committed Jul 24, 2014
1 parent b51586f commit b1300bb
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,55 @@
hapi-route-directory
====================

Hapi route directory
Provides a route directory for your hapi application.
```
{
"methods": {
"GET": [
"/accounts",
"/accounts/{id}",
"/api"
],
"POST": [
"/accounts"
],
"PUT": [
"/accounts/{id}"
],
"DELETE": [
"/accounts/{id}"
]
},
"paths": [
{
"/accounts": [
"GET",
"POST"
]
},
{
"/accounts/{id}": [
"GET",
"PUT",
"DELETE"
]
},
{
"/api": [
"GET"
]
}
]
}
```

# Usage

```
server.pack.register({ plugin: require('hapi-route-directory'), options: {path:'/api'}}, function(err, a){
if (err) throw err;
} );
```
## Options
### path
This defines the route where you'd like to put your api directory (default = '/')

0 comments on commit b1300bb

Please sign in to comment.