Skip to content

Commit

Permalink
Merge pull request igorantun#22 from lisandro52/master
Browse files Browse the repository at this point in the history
Fixed igorantun#21. The views, and other folders, now load relative to the bas…
  • Loading branch information
igorantun committed Sep 4, 2015
2 parents 07e214e + 1efc77c commit 877bd3d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var log = require('./lib/log.js');
var utils = require('./lib/utils.js');
var config = require('./config.json');
var pack = require('./package.json');
var path = require('path');


/* Config */
Expand Down Expand Up @@ -43,13 +44,14 @@ if(config.readline.use) {

/* Express */
app.set('port', port);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
app.use(favicon(__dirname + '/public/img/favicon.png'));
app.use(favicon(path.join(__dirname,'public/img/favicon.png')));
app.locals.version = pack.version;


/* Routes */
app.use(config.url, express.static(__dirname + '/public'));
app.use(config.url, express.static(path.join(__dirname, 'public')));
app.get(config.url, function (req, res) {
res.render('index', {version:pack.version});
});
Expand Down

0 comments on commit 877bd3d

Please sign in to comment.