dockerized
This commit is contained in:
20
server.js
Normal file
20
server.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'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}`);
|
Reference in New Issue
Block a user