Skip to content

Commit 8ac7b9a

Browse files
add documentation
1 parent 9a9a07d commit 8ac7b9a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,23 @@ which helps getting the HTML to clients faster.
107107

108108
[ember-cli-fastboot]: https://github.com/ember-fastboot/ember-cli-fastboot
109109

110+
## VisitOptions
111+
112+
For sending over additional metadata so that it could be leveraged by the consuming app/addon, you can pass the `visitOptions` option that contains any extra information that might be necessary.
113+
114+
Example usecase: If an addon relies on some metadata that is set by the consuming app, then in that case the addon will not have the access to the metadata value. In such cases, developing against dummy app becomes difficult. Hence, passing in the `visitOptions` will enable smoother local addon development.
115+
116+
```js
117+
app.get('/*', fastbootMiddleware({
118+
distPath: '/path/to/dist',
119+
visitOptions: {
120+
metadata: {
121+
foo: 'bar'
122+
}
123+
}
124+
}));
125+
```
126+
110127
## Tests
111128

112129
`npm test`

0 commit comments

Comments
 (0)