added stuff for letsencrypt

This commit is contained in:
Martin Donnelly 2020-04-17 14:40:59 +01:00
parent 5dba045277
commit 9b46955f96

8
app.js
View File

@ -51,6 +51,8 @@ app.all('/*', (req, res, next) => {
next();
});
app.use('/.well-known', express.static('.well-known'));
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, indexView));
});
@ -121,11 +123,12 @@ app.get('/api/v1/list', getList);
app.get('/:encoded_id', getEncodedID);
// Old pre letsencrypt
/*
const server = app.listen(config.port, () => {
logger.info(`Server listening on port ${config.port}`);
});
*/
/*
if (require.main === module)
app.listen(config.port, () => {
@ -134,3 +137,4 @@ if (require.main === module)
// Instead do export the app:
module.exports = app;
*/