mirror of
https://github.com/italicsjenga/handlebars-ipinfo.git
synced 2024-11-24 05:21:29 +11:00
First working server
This commit is contained in:
parent
b3fab4fdc2
commit
5876ba347f
13
index.ts
13
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);
|
Loading…
Reference in a new issue