File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,7 @@ $ npm install http-proxy-middleware --save
803803Next, 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
808808module.exports = {
809809 setupProxy: function(app) {
@@ -815,11 +815,11 @@ module.exports = {
815815You 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
820820module.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` ` `
You can’t perform that action at this time.
0 commit comments