From 5876ba347fd0cb496b1b713b7bf62fec18d8b8eb Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Fri, 2 Jun 2017 19:00:22 +1000 Subject: [PATCH] First working server --- index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/index.ts b/index.ts index e69de29..4a8f505 100644 --- a/index.ts +++ b/index.ts @@ -0,0 +1,13 @@ +import express = require('express'); +import expresshb = require('express-handlebars'); + +var app = express(); + +app.engine('handlebars', expresshb({defaultLayout: 'main'})); +app.set('view engine', 'handlebars'); + +app.get('/', function (req, res) { + res.render('home'); +}); + +app.listen(3000); \ No newline at end of file