-
Notifications
You must be signed in to change notification settings - Fork 3
Local Frontend Testing Guide
Below is a guide for running the ConU CoursePlanner frontend on your local machine for faster testing than having to do a full build + deploy each time you make a change. This is not the only way to get this working but it is the way that I have got it working for myself and it's very simple so I recommend this method.
Install the following programs:
- nodejs - to build the frontend
- IntelliJ or any static file server - to serve the static frontend files (html, css, js) locally
- nginx - to redirect (a.k.a. proxy) all backend requests to our remote server
maven does not need to be installed for this to work
-
Open IntelliJ, go to Settings -> Build, Execution, Deployment --> Debugger --> Built-in server and make note of the listed port number (I believe the default is 63342).
-
Navigate to the
conf/folder in the location where you installed nginx. Open up the file namenginx.confand replace the contents of the file with my configuration sample file. -
If needed, replace the port number (127.0.0.1:63342) with the one you found in step 1.
-
Start nginx by navigating to the location where you installed nginx and run the program:
On Windows
./nginx.exeOn Linux
TBD
-
Navigate to the root folder of the project and run the frontend build command(s):
Install node dependencies if needed
npm installBuild frontend
npm run build-dev -
Open up
localhoston your browser or click the link: http://localhost/ -
Make changes to code (I reccomend changing a string value in
src/main/webapp/babel-src/util.js), do step 1 then refresh the page.
- General Project Docs
- Deployment Guide
- Local Frontend Testing Guide
- REST API Spec
- Dev Tips/Miscellaneous