Skip to content

Commit 29ccdeb

Browse files
committed
new web server
1 parent 3c1caf4 commit 29ccdeb

21 files changed

+759
-317
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
zoom-platform.sh
22
innoextract*
3-
/www/out
3+
/www/out
4+
www/.env

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"deno.enable": true,
3+
"deno.lint": true,
4+
"deno.unstable": true,
5+
"editor.formatOnSave": true,
6+
"deno.enablePaths":[
7+
"./www"
8+
],
9+
"[typescript]": {
10+
"editor.defaultFormatter": "denoland.vscode-deno"
11+
}
12+
}

start-www.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
# build latest commit
3+
./dist.sh
4+
5+
cd "www" || exit
6+
7+
# download latest stable
8+
wget -O "public/zoom-platform.sh" "https://github.com/ZOOM-Platform/zoom-platform.sh/releases/latest/download/zoom-platform.sh"
9+
10+
deno task start

www/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
# zoom-platform.sh website
2-
no frameworks, no fancy bundlers, just a towering html monolith
2+
Deno server only required if you want to be able to serve specific versions of the script.
33

44
## Deploying
55
1. Clone this repo
6-
2. `cd www && build.sh` (All this does is download the latest release .sh and copy everything to `out`)
7-
3. Serve `www/out/`
6+
2. `./dist.sh`
7+
3. `./start-www.sh` (saves latest stable script to www/dist)
8+
4. `deno task start` (optional)
9+
5. Serve `www/dist`
810

911
We can't use GitHub/CF Pages cause they force SSL. Server is running Nginx with a simple config:
1012
```nginx
1113
server {
1214
listen 80;
1315
listen [::]:80;
1416
15-
root PATH_TO_OUT_DIR;
17+
root PATH_TO_PUBLIC_DIR;
1618
index index.html;
1719
server_name zoom-platform.sh;
1820
1921
location / {
20-
try_files $uri $uri/ $uri.html /index.html;
22+
try_files $uri $uri/ @proxy;
23+
}
24+
25+
location @proxy {
26+
proxy_pass http://0.0.0.0:23412;
2127
}
2228
}
2329
```

www/build.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

www/deno.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"compilerOptions": {
3+
"allowJs": true,
4+
"lib": ["deno.window"],
5+
"strict": true
6+
},
7+
"lint": {
8+
"include": ["server.ts"],
9+
"rules": {
10+
"tags": ["recommended"],
11+
"include": ["ban-untagged-todo"],
12+
"exclude": ["no-unused-vars"]
13+
}
14+
},
15+
"fmt": {
16+
"useTabs": false,
17+
"lineWidth": 80,
18+
"indentWidth": 2,
19+
"semiColons": false,
20+
"singleQuote": true,
21+
"proseWrap": "always",
22+
"include": ["server.ts"]
23+
},
24+
"tasks": {
25+
"start": "deno run --allow-read='./','../zoom-platform.sh',$(which deno) --allow-env --allow-run=git,sh --allow-sys=uid,gid --allow-net server.ts",
26+
"dev": "deno run --allow-read='./','../zoom-platform.sh',$(which deno) --allow-env --allow-run=git,sh --allow-sys=uid,gid --allow-net --watch server.ts"
27+
},
28+
"exclude": ["dist/"]
29+
}

www/deno.lock

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.

www/public/font/3270Condensed-Regular.woff

Whitespace-only changes.
64.7 KB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)