Permalink
Browse files

Create example_app.js

  • Loading branch information...
1 parent 31817c9 commit d04e881b99de40c5816cbe076b96510ca09e8117 @daraser daraser committed Dec 13, 2012
Showing with 24 additions and 0 deletions.
  1. +24 −0 example_app.js
View
@@ -0,0 +1,24 @@
+var express = require('express');
+var app = express();
+
+// load express doT
+var doT = require('express-dot');
+
+app.configure(function() {
+
+ // set views folder
+ app.set('views', __dirname);
+
+ // doT engine
+ app.set('view engine', 'dot' );
+ app.engine('dot', doT.__express );
+
+});
+
+// respond
+app.get('/', function(req, res, next){
+ // you need to have in views folder
+ res.render('index', { });
+});
+
+app.listen(3000);

0 comments on commit d04e881

Please sign in to comment.