startpage/server.js
choelzl c1b1081b10
All checks were successful
continuous-integration/drone/push Build is passing
Upgraded packages and removed static
2022-05-16 10:21:57 +02:00

20 lines
391 B
JavaScript

'use strict';
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
const fastify = require('fastify')()
const path = require('path')
// fastify.register(require('@fastify/static'), {
// root: path.join(__dirname),
// })
fastify.get('/', function (req, reply) {
return reply.sendFile('index.html');
})
fastify.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);