var express = require('express');
var app = express();

app.set('view engine', 'ejs');

app.use(express.static("public"));
app.use(express.static("views"));

app.get('*', function(req, res) {
    if (req.headers.host.match(/^www/) !== null ) {
        res.redirect('http://' + req.headers.host.replace(/^www\./, '') + req.url);
    } else {
        res.render(__dirname + '/views/index');
    }
});

var port = process.env.PORT || '3000';

var server = app.listen(port, function() {
    var host = server.address().address;
    var port = server.address().port;

    console.log("app listening on " + host + " " + port);
});
@@ -57,17 +57,17 @@
 app.set(
-'
+%22
 view eng
@@ -73,16 +73,103 @@
 gine
-', 'ejs'
+%22, %22ejs%22);%0Aapp.engine(%22html%22, require(%22ejs%22).renderFile);%0Aapp.set(%22views%22, __dirname + %22/views%22
 );%0A%0A
@@ -444,33 +444,19 @@
 der(
-__dirname + '/views/index
+'index.html
 ');%0A

update server