Skip to content

Commit 11de79f

Browse files
author
Liran Brimer
committed
doc: README example
1 parent 33ebf4a commit 11de79f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ Providing an alternative way to decide which requests should be proxied; In case
217217
router: function(req) {
218218
return 'http://localhost:8004';
219219
}
220+
221+
// Asynchronous router function which returns promise
222+
router: async function(req) {
223+
const url = await doSomeIO();
224+
return url;
225+
}
220226
```
221227

222228
- **option.logLevel**: string, ['debug', 'info', 'warn', 'error', 'silent']. Default: `'info'`

0 commit comments

Comments
 (0)