]>
git.r.bdr.sh - rbdr/corona-regeln/blob - bin/corona-regeln
3 const Fastify
= require('fastify')({ logger: true })
4 const PointOfView
= require('point-of-view');
5 const Eta
= require('eta');
6 const { join
} = require('path');
8 const CoronaRegeln
= require('../lib/corona-regeln.js');
9 const Config
= require('../config');
11 Fastify
.register(PointOfView
, {
15 root: join(__dirname
, '../templates'),
18 Fastify
.get('/', async (request
, reply
) => {
20 return reply
.view('/index.eta', { rules: await CoronaRegeln
.run(Config
) });
23 Fastify
.listen(Config
.port
)
26 console
.error(error
.stack
|| error
.message
|| error
);