/**
 * Module dependencies.
 */

var express = require('express');
var routes = require('./routes');
var http = require('http');
var path = require('path');
var passport = require('passport');
var config = require('./lib/config');
var app = express();

// all environments
app.set('port', process.env.PORT || 1337);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.json());
app.use(express.urlencoded());

app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.session({ secret: 'c8d62d23fc909ec5dd5c51c0119bc5a8f2702fca' }));
app.use(passport.initialize());
app.use(passport.session());

app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// Passport Config
config.passport(passport);

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}

routes.path(app);

http.createServer(app).listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});

@@ -118,24 +118,54 @@
 re('http');%0A
+var https = require('https');%0A
 var path = r
@@ -276,16 +276,220 @@
 ess();%0A%0A
+// Https%0A//var privateKey  = fs.readFileSync('sslcert/server.key', 'utf8');%0A//var certificate = fs.readFileSync('sslcert/server.crt', 'utf8');%0A//var credentials = %7Bkey: privateKey, cert: certificate%7D;%0A%0A%0A%0A
 // all e
@@ -1359,8 +1359,70 @@
 ));%0A%7D);%0A
+%0A// Https%0A//https.createServer(credentials, app).listen(443);%0A

Add https support