parent
d390d662a9
commit
df6e425f9f
3 changed files with 27 additions and 16 deletions
12
src/setupProxy.js
Normal file
12
src/setupProxy.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const proxy = require('http-proxy-middleware');
|
||||
|
||||
module.exports = function(app) {
|
||||
app.use(
|
||||
proxy('/.netlify/functions/', {
|
||||
target: 'http://localhost:9000/',
|
||||
pathRewrite: {
|
||||
'^/\\.netlify/functions': ''
|
||||
}
|
||||
})
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue