Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create example_app.js

  • Loading branch information...
commit d04e881b99de40c5816cbe076b96510ca09e8117 1 parent 31817c9
daraser daraser authored
Showing with 24 additions and 0 deletions.
  1. +24 −0 example_app.js
24 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);
Please sign in to comment.
Something went wrong with that request. Please try again.