netlify-faunadb-example2/src/setupProxy.js
2018-10-06 13:03:55 +01:00

10 lines
235 B
JavaScript

const proxy = require('http-proxy-middleware');
module.exports = function(app) {
app.use(proxy('/.netlify/functions/', {
target: 'http://localhost:9000/',
"pathRewrite": {
"^/\\.netlify/functions": ""
}
}));
};