Skip to content

Commit 1795ba4

Browse files
author
Peter Wilson
committed
move frontend to port 80, add screenshots in readme
1 parent 853d634 commit 1795ba4

File tree

9 files changed

+22
-13
lines changed

9 files changed

+22
-13
lines changed

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This is an implementation of a scalable day trading application for UVic's Scala
55

66
## Running
77

8-
`docker compose up` will get the server running. It expects your computer has 16GB of ram and allocates memory between containers accordingly.
8+
`docker compose up` will get the server running. It expects your computer has 16GB of ram and allocates memory between containers accordingly. The frontend will be available at `http://localhost:80`
99

1010
### CLI
1111

@@ -14,14 +14,11 @@ There are downloadable binaries for the CLI on the releases pages. `cli --help`
1414
### GUI
1515
NextJS React Application
1616

17-
#### Run frontend in development mode
18-
1. Node 16 or greater must be installed
19-
2. Run
20-
```sh
21-
cd frontend
22-
npm install
23-
npm run dev
24-
```
17+
<img src="readmeimages/1.png" alt="">
18+
<img src="readmeimages/2.png" alt="">
19+
<img src="readmeimages/3.png" alt="">
20+
<img src="readmeimages/4.png" alt="">
21+
<img src="readmeimages/5.png" alt="">
2522

2623
## Architecture
2724

docker-compose.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ services:
1414
POSTGRES_PASSWORD: "daytrader"
1515
command: postgres -c max_connections=5010 -c fsync=off -c synchronous_commit=off -c full_page_writes=false -c effective_cache_size=8GB
1616
healthcheck:
17-
test: ["CMD-SHELL", "sh -c 'pg_isready -U daytrader -d daytrader'"]
17+
test:
18+
[
19+
"CMD-SHELL",
20+
"sh -c 'pg_isready -U daytrader -d daytrader'"
21+
]
1822
interval: 5s
1923
timeout: 5s
2024
retries: 5
@@ -38,7 +42,7 @@ services:
3842
condition: service_started
3943
init: true
4044
ports:
41-
- "80:8000"
45+
- "8000:8000"
4246
quote-server-adaptor:
4347
image: ghcr.io/marcusdunn/day-trader/quote-server-adaptor
4448
init: true
@@ -54,4 +58,4 @@ services:
5458
- FRONTEND_URL=http://swift-trader-frontend:3000/
5559
- transactionURI=lean:8000
5660
ports:
57-
- "3000:3000"
61+
- "80:3000"

frontend/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@ swift-trader-frontend/
4343
├── components/ # Contains reusable UI components
4444
└── ...
4545
```
46+
47+
## Screenshots
48+
49+
<img src="../readmeimages/1.png" alt="">
50+
<img src="../readmeimages/2.png" alt="">
51+
<img src="../readmeimages/3.png" alt="">
52+
<img src="../readmeimages/4.png" alt="">
53+
<img src="../readmeimages/5.png" alt="">

frontend/pages/api/clients/DayTraderClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from "path";
55
const protoPath = path.join(process.cwd(), 'pages', 'api', 'clients', 'day-trader.proto');
66
const def = loadSync(protoPath)
77
const definitions = grpc.loadPackageDefinition(def)
8-
const DayTraderClient = new definitions.day_trader.DayTrader(process.env.transactionURI || 'localhost:80', grpc.credentials.createInsecure());
8+
const DayTraderClient = new definitions.day_trader.DayTrader(process.env.transactionURI || 'localhost:8000', grpc.credentials.createInsecure());
99

1010

1111
export function Add(userId, amount, requestNum) {

readmeimages/1.png

5.4 MB
Loading

readmeimages/2.png

273 KB
Loading

readmeimages/3.png

301 KB
Loading

readmeimages/4.png

323 KB
Loading

readmeimages/5.png

135 KB
Loading

0 commit comments

Comments
 (0)