From 4a6e4ca37affe06880f11d08876451f20edeffe9 Mon Sep 17 00:00:00 2001 From: Mhykol Date: Tue, 28 May 2024 05:27:49 -0400 Subject: Added route for videos --- app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 969492f..3998b0b 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,9 @@ const mime = { avif: 'image/avif', ico: 'image/ico', svg: 'image/svg+xml', - js: 'application/javascript' + js: 'application/javascript', + mp4: 'video/mp4', + webm: 'video/webm' } require('dotenv').config() @@ -55,6 +57,10 @@ class App { const data = this.readfile.GetFile(req.path) data.mime.then(output => this.#FileOpen({data: data, mime: output, res: res})) }) + app.get('/vid/*', this.#Logger, (req, res) => { + const data = this.readfile.GetFile(req.path) + data.mime.then(output => this.#FileOpen({data: data, mime: output, res: res})) + }) app.route('*') .get(this.#ValidateCookie, this.#Logger, (req, res) => { -- cgit v1.2.3-70-g09d2