aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-12-20 00:11:18 +0100
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-12-20 00:11:18 +0100
commit92ccd82c73463fa0b67996dc9212e992f90a1454 (patch)
tree456f16a2a88c3f9613c9eaf3dcdf3876aa36d689 /index.js
parent55fd5e33b1430fd6498f476490da6b5fa6abd70c (diff)
Port to svelteHEADsveltemain
Diffstat (limited to 'index.js')
-rw-r--r--index.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/index.js b/index.js
deleted file mode 100644
index cc5c3b9..0000000
--- a/index.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-const Config = require('./config/config');
-const Koa = require('koa');
-const KoaStatic = require('koa-static');
-const Nunjucks = require('nunjucks');
-const RecordFetcher = require('./lib/record_fetcher');
-
-const internals = {};
-
-internals.run = () => {
-
- Nunjucks.configure(Config.templateDirectory);
-
- internals.app = Koa();
-
- internals.app.use(KoaStatic(Config.staticDirectory));
-
- const recordFetcher = new RecordFetcher();
- internals.app.use(function * () {
-
- const record = yield recordFetcher.fetch();
- const parsedTemplate = Nunjucks.render('index.html.njk', record);
-
- this.body = parsedTemplate;
- });
-
- console.log(' .');
- console.log(' /');
- console.log(' +-----+');
- console.log(` | o o | - Listening Gladly, Try Me: ${Config.port}`);
- console.log(' +-----+');
- console.log(' +---------+');
- console.log(' /| [][] |\\');
- console.log(' || | |');
- console.log(' || | \\c');
- console.log(' ^+---------+');
- console.log(' (.) ');
- internals.app.listen(Config.port);
-};
-
-internals.run();