mjcapecci / learnalysis

A web application for keeping track of your learning over time. Built with React, Redux, Node, Express, and MongoDB
0 stars 0 forks source link

Install npm http-proxy-middleware #3

Open mjcapecci opened 4 years ago

mjcapecci commented 4 years ago

Install the above npm package and create a file in the src folder called setupProxy.js with the following contents:

const proxy = require('http-proxy-middleware')

module.exports = function(app) {
  app.use(proxy('/api', { target: 'http://localhost:5000/' }))
}
mjcapecci commented 4 years ago

This middleware may not be necessary, but it's still worth looking into. I will probably want to implement the same solution that I utilized on Contractr.io