Skip to content

Commit 31efc38

Browse files
committed
Document routePrefix registration option.
1 parent 5aa9e6a commit 31efc38

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

docs/setup.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ Once you've got a development environment, an Express server, and a database, al
5858

5959
`koop.register(provider)`
6060

61+
With Koop 3.10.0 and higher, you can add a prefix to all routes for a specific provider at registration time. For example:
62+
63+
`koop.register(provider, { routePrefix: '/api/v1})`
64+
65+
Adding the above option will prepend `/api/v1` to all of a provider's custom routes as well as the routes generated by any registered output plugins.
66+
6167
## 4. Start the server!
6268

6369
If you've got everything set up properly, you should be able to start the server! Add a script to you package.json like the example below that points to your server file and type `npm start`.

docs/setup/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ <h2>2. Express server</h2>
9696
<h2>3. Providers</h2>
9797
<p>Once you&#x2019;ve got a development environment, an Express server, and a database, all you need to do is configure your providers! See the complete <a href="../docs/providers/">list of providers</a> for further instructions.</p>
9898
<p><code>koop.register(provider)</code></p>
99+
<p>With Koop 3.10.0 and higher, you can add a prefix to all routes for a specific provider at registration time. For example:</p>
100+
<p><code>koop.register(provider, { routePrefix: &apos;/api/v1})</code></p>
101+
<p>Adding the above option will prepend <code>/api/v1</code> to all of a provider&#x2019;s custom routes as well as the routes generated by any registered output plugins.</p>
99102
<h2>4. Start the server!</h2>
100103
<p>If you&#x2019;ve got everything set up properly, you should be able to start the server! Add a script to you package.json like the example below that points to your server file and type <code>npm start</code>.</p>
101104
<script src="https://gist.github.com/dmfenton/114c09b3befd8e60b3a30ff5f65d8c82.js"></script>

0 commit comments

Comments
 (0)