Skip to content

Commit

Permalink
Update README to include build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Aug 3, 2021
1 parent 0cd90e8 commit f7c5984
Showing 1 changed file with 52 additions and 5 deletions.
57 changes: 52 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit f7c5984

Please sign in to comment.