diff options
| author | Mhykol <mchaeldonald62@pm.me> | 2024-05-28 05:27:49 -0400 |
|---|---|---|
| committer | Mhykol <mchaeldonald62@pm.me> | 2024-05-28 05:27:49 -0400 |
| commit | 4a6e4ca37affe06880f11d08876451f20edeffe9 (patch) | |
| tree | a0617f0a5b70c04543cecff5327b37e6449d3902 /app.js | |
| parent | a13a1045dca2fa2c70617d853b7bd08c34c3cffe (diff) | |
Added route for videos
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) => { |
