index: remove commented-out code

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-01-12 14:01:52 +08:00
parent 80d21e9853
commit 485d731fc3

View File

@ -161,13 +161,8 @@ app.get("/token", function(req,res) {
}); });
app.get('/', (req, res) => { app.get('/', (req, res) => {
res.writeHead(200, {'Content-Type': 'text/html'}); res.writeHead(200, {'Content-Type': 'text/html'});
// var stream = fs.createReadStream('index.html');
// stream.on('error', (error) => {
res.write('<style>body{font-family: sans-serif;}</style><h2>reveal.js multiplex server.</h2><a href="/token">Generate token</a>'); res.write('<style>body{font-family: sans-serif;}</style><h2>reveal.js multiplex server.</h2><a href="/token">Generate token</a>');
res.end(); res.end();
// });
// stream.on('readable', () => { stream.pipe(res); });
}); });
app.use(express.static(config.repo_root)); app.use(express.static(config.repo_root));
server.listen(config.port, config.addr, () => console.log(`Example app listening on port ${config.port}!`)); server.listen(config.port, config.addr, () => console.log(`Example app listening on port ${config.port}!`));