diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/client/index.ts | 4 | ||||
-rw-r--r-- | source/client/rnnoise.ts | 2 | ||||
-rw-r--r-- | source/server/index.ts | 13 |
3 files changed, 10 insertions, 9 deletions
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()) |