Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cole Panike committed Dec 13, 2019
1 parent d1818bc commit 8fdd122
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### 3.0.1

- Updates documentation.

### 3.1.0

- `routes_dir` accepts an array of parameters.
- Updates documentation.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![NPM](https://nodei.co/npm/hapi-auto-route.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/hapi-auto-route/)

hapi-auto-route is a hapi plugin that lets you load route objects automatically from a directory. And allow routes path to be prefixed.
hapi-auto-route is a hapi plugin that lets you load route objects automatically by specifying the root directory/directories containing the routes. And allow routes path to be prefixed.

Maintainer: [Sitraka Ratsimba](https://github.com/sitraka-hq)

Expand Down Expand Up @@ -80,10 +80,12 @@ init();

Now, you can start the server and see `Hello` at `http://localhost:3000`.

You can also provide an array of absolute paths if you want to auto-import from multiple base directories.


## API

- `routes_dir`: absolute path to routes directory. `required`
- `routes_dir`: absolute path(s) to routes directory/directories. `required`
- `pattern`: glob pattern used to find route files. Defaults to `**/!(_)*.js`.
- `use_prefix`: Use directory tree as prefix. Defaults to `false`.

Expand Down

0 comments on commit 8fdd122

Please sign in to comment.