Skip to content

Commit

Permalink
stripped down
Browse files Browse the repository at this point in the history
  • Loading branch information
rc1 committed May 20, 2013
1 parent 93db369 commit 4418df2
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,18 @@ var path = require('path');
var app = express();

app.configure(function(){
app.use(function(req, res, next) {
app.locals.pretty = true;
next();
});
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(lessMiddleware({
src: path.join(__dirname, 'public')
}));
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.directory(path.join(__dirname, 'public')));
});

app.configure('development', function(){
app.use(express.errorHandler());
});

app.get("/", function (req, res) {
res.render("index", {
title : "Title"
});
app.configure('production', function(){
console.log("Should not be used for production");
});

http.createServer(app).listen(app.get('port'), function(){
Expand Down

0 comments on commit 4418df2

Please sign in to comment.