Null reference for server in createServer callback