Set-up the Frontend
Please follow these instructions to configure and run the Frontend on your localhost

Open a New Terminal Window

As you know, our Backend and Frontend web apps are separate, therefore we will need separate terminal (Mac) or cmd (windows) windows running at the same time to lunch the Registration System.
Please lunch a new terminal/cmd window before proceeding to the next steps.
Please navigate into the 'Frontend' project directory and install the dependencies within your new terminal/cmd window.
1
cd <Frontend-dir> yarn install OR npm install
Copied!

Configure Webpack

Before we can build, run or deploy our Frontend it is important to ensure that the 'webConfig.json' file is configured correctly for our environment.
1
{
2
"siteURL": "http://localhost:8080",
3
"axiosInstance_baseURL": "http://localhost:3000/api",
4
"environment": "development"
5
}
Copied!
Please ensure this object is configured correctly:
    siteURL - URL for the Frontend app
    axiosInstance_baseURL - URL for Backend app + '/api'
Please note: You must add '/api' to the end of your Backend URL.
By default your Frontend/Backend will be running on:
1
Frontend: http://localhost:8080
2
Backend: http://localhost:3000
Copied!
In the same way, set ‘environment’ to either ‘development’ or ‘production’. This will change the way webpack compiles your code.

Run a build and lunch our Frontend Web App

1
yarn run build OR npm run build
2
yarn run dev OR npm run dev
Copied!
Your backend app should be running on
1
http://localhost:8080
Copied!
Last modified 3yr ago
Copy link