Skip to content

Commit

Permalink
Misc refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 5, 2010
1 parent 8d3296f commit 5528f0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/express
Expand Up @@ -190,7 +190,7 @@ var app = [
, ' app.set(\'views\', __dirname + \'/views\');'
, ' app.set(\'view engine\', \':TEMPLATE\');'
, ' app.use(express.bodyDecoder());'
, ' app.use(express.methodOverride());:SESS:CSS'
, ' app.use(express.methodOverride());{sess}{css}'
, ' app.use(app.router);'
, ' app.use(express.staticProvider(__dirname + \'/public\'));'
, '});'
Expand Down Expand Up @@ -321,14 +321,14 @@ function createApplicationAt(path) {
switch (cssEngine) {
case 'sass':
case 'less':
app = app.replace(':CSS', '\n app.use(express.compiler({ src: __dirname + \'/public\', enable: [\'' + cssEngine + '\'] }));');
app = app.replace('{css}', '\n app.use(express.compiler({ src: __dirname + \'/public\', enable: [\'' + cssEngine + '\'] }));');
break;
default:
app = app.replace(':CSS', '');
app = app.replace('{css}', '');
}

// Session support
app = app.replace(':SESS', sessions
app = app.replace('{sess}', sessions
? '\n app.use(express.cookieDecoder());\n app.use(express.session());'
: '');

Expand Down

0 comments on commit 5528f0d

Please sign in to comment.