Skip to content

Commit fa6c613

Browse files
authored
Merge pull request #489 from FranzSkuffka/patch-1
Update proxy configuration docs
2 parents 7f3f15b + 430c0dc commit fa6c613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

template/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ $ npm install http-proxy-middleware --save
803803
Next, create `elmapp.config.js` in the root of your project and place the following contents in it:
804804

805805
```js
806-
const proxy = require('http-proxy-middleware');
806+
const {createProxyMiddleware} = require('http-proxy-middleware');
807807
808808
module.exports = {
809809
setupProxy: function(app) {
@@ -815,11 +815,11 @@ module.exports = {
815815
You can now register proxies as you wish! Here's an example using the above http-proxy-middleware:
816816

817817
```js
818-
const proxy = require('http-proxy-middleware');
818+
const {createProxyMiddleware} = require('http-proxy-middleware');
819819
820820
module.exports = {
821821
setupProxy: function(app) {
822-
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
822+
app.use(createProxyMiddleware('/api', { target: 'http://localhost:5000/' }));
823823
}
824824
};
825825
```

0 commit comments

Comments
 (0)