aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-07 10:20:44 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-07 10:20:44 +0200
commit832f48f29098cc6f840ade90db3b94efa67c6833 (patch)
tree5311a3c4d8ba0302bbe208bc33717dbfdc0deb10
parentc347f41af4e7d82fc08ed068ed6f18f4a59e90ba (diff)
downloadkeks-meet-832f48f29098cc6f840ade90db3b94efa67c6833.tar
keks-meet-832f48f29098cc6f840ade90db3b94efa67c6833.tar.bz2
keks-meet-832f48f29098cc6f840ade90db3b94efa67c6833.tar.zst
about to refactor
-rw-r--r--public/index.html2
-rw-r--r--source/client/index.ts4
-rw-r--r--source/client/rnnoise.ts2
-rw-r--r--source/server/index.ts13
4 files changed, 11 insertions, 10 deletions
diff --git a/public/index.html b/public/index.html
index ded060a..d88abbd 100644
--- a/public/index.html
+++ b/public/index.html
@@ -12,7 +12,7 @@
<body>
<p>
- keks-meet needs evil javascript to enabled. Don't be afraid though, all
+ keks-meet needs evil javascript to be enabled. Don't be afraid though, all
the code is free (AGPL-3.0-only)! Look at it on
<a href="https://codeberg.org/metamuffin/keks-meet">codeberg</a>
</p>
diff --git a/source/client/index.ts b/source/client/index.ts
index d3c3fcc..745dd67 100644
--- a/source/client/index.ts
+++ b/source/client/index.ts
@@ -46,8 +46,8 @@ function create_start_screen() {
el.append(
h2("keks-meet"),
p("A web conferencing application using webrtc"),
- p("keks-meet is free! It is licenced under the terms of the third version of the GNU Affero General Public Licence only."),
- p("To get started, just enter a unique idenfier, then share the URL with your partner.")
+ p("keks-meet is free software! It is licenced under the terms of the third version of the GNU Affero General Public Licence only."),
+ p("To get started, just enter a unique idenfier, click 'Join', then share the URL with your partner.")
)
const room_input = document.createElement("input")
diff --git a/source/client/rnnoise.ts b/source/client/rnnoise.ts
index 71c73e6..7867682 100644
--- a/source/client/rnnoise.ts
+++ b/source/client/rnnoise.ts
@@ -23,7 +23,7 @@ export async function get_rnnoise_node(context: AudioContext): Promise<RNNoiseNo
if (!RNNoiseNode) {
log("rnnoise", "loading wasm...")
script = document.createElement("script")
- script.src = "/rnnoise/rnnoise-runtime.js"
+ script.src = "/_rnnoise/rnnoise-runtime.js"
script.defer = true
document.head.appendChild(script)
//@ts-ignore asdfsfad
diff --git a/source/server/index.ts b/source/server/index.ts
index f77d8a5..de2ba4e 100644
--- a/source/server/index.ts
+++ b/source/server/index.ts
@@ -5,6 +5,7 @@ import { bundle } from "https://deno.land/x/emit@0.1.1/mod.ts";
const app = new Application()
const root = new Router()
+
root.get("/", async c => { await c.send({ path: "index.html", root: `${Deno.cwd()}/public` }) })
root.get("/room/:id", async c => { await c.send({ path: "index.html", root: `${Deno.cwd()}/public` }) })
@@ -26,17 +27,17 @@ function respondWithType(mimeType: string, f: () => string): (c: RouterContext<a
let bundle_code = ""
root.get("/bundle.js", respondWithType("application/javascript", () => bundle_code))
+root.use(api.routes())
+
function mountFilesystem(r: Router, route: string, path: string) {
r.get(route + "/(.*)", async (context) => {
- await send(context, context.request.url.pathname, { root: Deno.cwd() + path });
+ console.log(context.request.url.pathname.substring(route.length));
+ await send(context, context.request.url.pathname.substring(route.length), { root: Deno.cwd() + path });
})
-
}
-mountFilesystem(root, "/style", "/public")
-mountFilesystem(root, "/rnnoise", "/public")
-
-root.use(api.routes())
+mountFilesystem(root, "/_style", "/public/style")
+mountFilesystem(root, "/_rnnoise", "/public/rnnoise")
app.use(root.routes())
app.use(root.allowedMethods())