server/db/setupProxy.js
2019-03-06 18:47:15 -05:00

6 lines
141 B
JavaScript

const proxy = require('http-proxy-middleware')
module.exports = app => {
app.use(proxy('/api/*', { target: 'http://localhost:1337/' }))
}