Skip to content

Commit

Permalink
new web server
Browse files Browse the repository at this point in the history
  • Loading branch information
doZennn committed Oct 7, 2024
1 parent 3c1caf4 commit ee18561
Show file tree
Hide file tree
Showing 21 changed files with 759 additions and 317 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
zoom-platform.sh
innoextract*
/www/out
/www/out
www/.env
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"editor.formatOnSave": true,
"deno.enablePaths":[
"./www"
],
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
10 changes: 10 additions & 0 deletions start-www.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# build latest commit
./dist.sh

cd "www" || exit

# download latest stable
wget -O "public/zoom-platform.sh" "https://github.com/ZOOM-Platform/zoom-platform.sh/releases/latest/download/zoom-platform.sh"

deno task start
16 changes: 11 additions & 5 deletions www/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# zoom-platform.sh website
no frameworks, no fancy bundlers, just a towering html monolith
Deno server only required if you want to be able to serve specific versions of the script.

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

We can't use GitHub/CF Pages cause they force SSL. Server is running Nginx with a simple config:
```nginx
server {
listen 80;
listen [::]:80;
root PATH_TO_OUT_DIR;
root PATH_TO_PUBLIC_DIR;
index index.html;
server_name zoom-platform.sh;
location / {
try_files $uri $uri/ $uri.html /index.html;
try_files $uri $uri/ @proxy;
}
location @proxy {
proxy_pass http://0.0.0.0:23412;
}
}
```
Expand Down
5 changes: 0 additions & 5 deletions www/build.sh

This file was deleted.

29 changes: 29 additions & 0 deletions www/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"compilerOptions": {
"allowJs": true,
"lib": ["deno.window"],
"strict": true
},
"lint": {
"include": ["server.ts"],
"rules": {
"tags": ["recommended"],
"include": ["ban-untagged-todo"],
"exclude": ["no-unused-vars"]
}
},
"fmt": {
"useTabs": false,
"lineWidth": 80,
"indentWidth": 2,
"semiColons": false,
"singleQuote": true,
"proseWrap": "always",
"include": ["server.ts"]
},
"tasks": {
"start": "deno run --allow-read='./','../zoom-platform.sh',$(which deno) --allow-env --allow-run=git,sh --allow-sys=uid,gid --allow-net server.ts",
"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"
},
"exclude": ["dist/"]
}
119 changes: 119 additions & 0 deletions www/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes
File renamed without changes.
File renamed without changes.
Binary file not shown.
Empty file.
Binary file added www/public/font/3270Condensed-Regular.woff2
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ee18561

Please sign in to comment.