diff --git a/README.md b/README.md index 11230ff..da2893f 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,57 @@ A re-write of Purdue ECN's webqueue ![UI Snapshot](./UI%20Snapshots/UI-Snapshot%202021-08-02%20at%2011.30.54%20PM.png) -## Stay Up To Date -See what's being worked on with [the webqueue2 Project](https://github.itap.purdue.edu/ECN/webqueue2/projects/). +## Using This Project +This is a web based client of [webqueue2-api](https://github.itap.purdue.edu/ECN/webqueue2-api). To use it you will need to do the following: -See and participate in the conversation by viewing the [issues](https://github.itap.purdue.edu/ECN/webqueue2/issues). -## Get Involved -Reading the [Dev Environment Setup Guide](https://github.itap.purdue.edu/ECN/webqueue2/blob/master/Dev%20Environment%20Setup%20Guide.md) +### Clone this GitHub repo: +```bash +git clone https://github.itap.purdue.edu/ECN/webqueue2-frontend.git +``` + +### Enter the repo directory: +```bash +cd webqueue2-frontend/ +``` + +### Install dependencies: +```bash +npm install +``` + +### Modify the "homepage" value in package.json +**Example:** +| Serving From | `homepage` Value | +| - | - | +| `www.coolproject.com` | `http://www.coolproject.com/` | +| `www.anothercoolproject.com/subdirectory` | `http://www.anothercoolproject.com/subdirectory` | + +```bash +nano package.json +``` + +### Build the Frontend +```bash +npm run build:frontend +``` +This will output a static bundle in the `build/` directory. This can be served by most webservers directly or moved to a preconfigured directory. See [Create React App's docs on Deployment](https://create-react-app.dev/docs/deployment/) for general info. + +For ECN's infrastructure, we assume you're deployment on Templeton using Apache. Im that case, you can use this `.htaccess` configuartion: + +``` +# Enable the rewrite module +RewriteEngine On + +# Reverse proxy all requests to the API to the API server. +# See mod_rewrite docs: https://httpd.apache.org/docs/current/mod/mod_rewrite.html +RewriteRule ^api/(.*)$ http://pier.ecn.purdue.edu:5000/api/$1 [P] + +# Defer requests that are not files to client side routing +# See: https://create-react-app.dev/docs/deployment/#serving-apps-with-client-side-routing +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^ index.html [QSA,L] + +# Diable Auth +Satisfy any +``` \ No newline at end of file