Skip to content

Commit

Permalink
Add js language to markdown for syntax highlighting (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Siegert authored and monkpow committed Oct 24, 2018
1 parent ad94d32 commit c68f1b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -39,7 +39,7 @@ If any Promise is rejected, ```next(x)``` is called in the hosting application,


e.g.
```
```js
app.use(proxy('/reject-promise', {
proxyReqOptDecorator: function() {
return Promise.reject('An arbitrary rejection message.');
Expand All @@ -49,23 +49,23 @@ e.g.

eventually calls

```
```js
next('An arbitrary rejection messasage');
```

### Host

The first positional argument is for the proxy host; in many cases you will use a static string here, eg.

```
```js
app.use('/', proxy('http://google.com'))
```

However, this argument can also be a function, and that function can be
memoized or computed on each request, based on the setting of
```memoizeHost```.

```
```js
function selectProxyHost() {
return (new Date() % 2) ? 'http://google.com' : 'http://altavista.com';
}
Expand Down

0 comments on commit c68f1b9

Please sign in to comment.