From e7b08b1dfe3f2a2596deb6e2a72bb79805d3708f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 3 Jul 2017 21:39:43 +0200 Subject: feat: Add code block highlighting Theme is configurable --- src/index.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 2c75554..b7bc1a3 100644 --- a/src/index.js +++ b/src/index.js @@ -11,8 +11,12 @@ if (targetDir) { const app = require("./app.js"); -module.exports = app; - -app.listen(PORT, () => { - console.log(`App listening on port ${PORT}`); -}); +(async function() { + try { + (await app()).listen(PORT, () => { + console.log(`App listening on port ${PORT}`); + }); + } catch (error) { + console.error("App startup error", error); + } +})(); -- cgit 1.4.1