/dist
directory, or in development mode, held in the Webpack dev server memory.base-mvc-bootcamp
from the end of Module 4, except with CORS middleware (discussed below).REACT_APP_
for Create React App). We use environment variables to support different runtime environments, e.g. local backend vs production backend on Heroku. BACKEND_URL
defaults to localhost:3004
for development purposes. Here is a link to the code.BACKEND_URL
to construct a complete URL. Here is a link to the code.index.mjs
. Here is a link to the code.cors
to accept cookie credentials from that frontend server URL with the following code (link):axios
requests with the following code (link). We will need to specify the following setting in every file where we import and use axios
.