diff options
| author | Mhykol <mchaeldonald62@pm.me> | 2024-06-21 08:31:02 -0400 |
|---|---|---|
| committer | Mhykol <mchaeldonald62@pm.me> | 2024-06-21 08:31:02 -0400 |
| commit | 1dd31494f0e270f24c2caad411e271b9bf5c781c (patch) | |
| tree | b06e0dd38a4e6c2a2e365169834cc2ab7bd68fcd /app.js | |
| parent | d7e95b22addb636c2f1fff42ccc46253cb3a3732 (diff) | |
Added rss feed for blog
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -32,6 +32,7 @@ const assetDir = [ 'vid' ] require('dotenv').config() +const rss = require('./source/rss')({baseUrl: process.env.baseUrl}) // Handles the routes class App { @@ -77,12 +78,18 @@ class App { this.data = this.readfile.GetRobots() this.data.mime.then(output => this.#FileOpen({data: this.data, mime: output, res: res})) break + case 'rss': + rss.GetFeed({ + title: process.env.rssTitle, + description: process.env.rssDescription, + author: process.env.rssAuthor + }).then(output => res.send(output)) + break default: if (this.path.string.endsWith('/') && this.path.string.length > 1) this.path.string = this.path.string.substring(0, this.path.string.length - 1) if (output.has(this.path.string)) { try { output.get(this.path.string).then(output => { - console.log(output.meta) res.send(this.readfile.GetMain(output.meta)) }) } catch { |
