I created a new NodeJS site based on the documentation of Durandal. It works locally. I set up Windows Azure to pull in the changes of my GitHub repository, which it does correctly.
However, (after enabling errors) I'm getting the an internal server error.
I checked my FTP for the logs, but don't have any. There is a 'Git' folder, but nothing interesting there.
When I change my server.js file to the hello world sample, everything works:
var http = require('http')
var port = process.env.PORT || 1337;
http.createServer(function(req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port);
This is my server.js now:
var express = require('express'),
routes = require('./routes'),
engines = require('consolidate');
exports.startServer = function(config, callback) {
var port = process.env.PORT || config.server.port || 1337;
var app = express();
var server = app.listen(port, function() {
console.log("Express server listening on port %d in %s mode", server.address().port, app.settings.env);
});
app.configure(function() {
app.set('port', port);
app.set('views', config.server.views.path);
app.engine(config.server.views.extension, engines[config.server.views.compileWith]);
app.set('view engine', config.server.views.extension);
app.use(express.favicon());
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.compress());
app.use(config.server.base, app.router);
app.use(express.static(config.watch.compiledDir));
});
app.configure('development', function() {
app.use(express.errorHandler());
});
app.get('/', routes.index(config));
callback(server);
};
So, has anyone succesfully hosted an Express (or more specifically, the Durandal skeleton for Mimosa) NodeJS site on Windows Azure? Or do you know how or where I can find the internal server error?