Permalink
Browse files

fixing how html2jade is resolved

  • Loading branch information...
aaronpowell committed Jan 4, 2012
1 parent f9c6d8c commit 0b82a974a357612a0a99724f1e1526700ac383fd
Showing with 9 additions and 2 deletions.
  1. +9 −2 web.js
View
11 web.js
@@ -1,8 +1,15 @@
var express = require('express'),
- html2jade = require('html2jade'),
server = express.createServer(),
pub = __dirname + '/static/',
- views = __dirname + '/views';
+ views = __dirname + '/views',
+ html2jade;
+
+try {
+ html2jade = require('html2jade');
+} catch (err) {
+ console.log('Failure to load \'html2jade\' module');
+ html2jade = require('./node_modules/html2jade/lib/html2jade')
+}
server.use(express.bodyParser());
server.use(express.static(pub));

0 comments on commit 0b82a97

Please sign in to comment.