diff --git a/app.js b/app.js new file mode 100644 index 0000000..23e15dc --- /dev/null +++ b/app.js @@ -0,0 +1,18 @@ +var express = require('express'); +var app = express.createServer(); + +app.configure(function () { + app.use(require('./blocks')); + app.use(app.router); +}); + +app.set('views', __dirname + '/views'); +app.set('view engine', 'html'); +app.register('.html', require('ejs')); + +app.get('/', function (req, res) { + res.render('test', { foo: 'bar' }); +}); + +app.listen(8080); +console.log('listening on port 8080...'); \ No newline at end of file diff --git a/layout_main.ejs b/layout_main.html similarity index 97% rename from layout_main.ejs rename to layout_main.html index bd8d1a2..c2ce738 100644 --- a/layout_main.ejs +++ b/layout_main.html @@ -14,3 +14,5 @@

Main Layout

+ +<%- body %> \ No newline at end of file diff --git a/layout_site.ejs b/layout_site.html similarity index 96% rename from layout_site.ejs rename to layout_site.html index c2afb47..79c30b4 100644 --- a/layout_site.ejs +++ b/layout_site.html @@ -15,8 +15,10 @@

Site Layout

+ + <%- body %> <%- block('foot') %> - + \ No newline at end of file diff --git a/index.ejs b/test.html similarity index 98% rename from index.ejs rename to test.html index 66f10c7..4e823e5 100644 --- a/index.ejs +++ b/test.html @@ -13,4 +13,4 @@

Index Page

+ \ No newline at end of file