I deployed my node.js app successfully to heroku however when I accessed the site there was an error saying
"Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch"
my code is
var router = require("./router.js");
// Create a web server
var http = require("http");
http.createServer(function (request, response) {
router.home(request, response);
router.user(request, response);
}).listen(1337);
console.log("Sever running at http://127.0.0.1:1337/");
I figured it has something to do with the port. There was a post similar to my problem Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch) but their solutions were based on Express. I didn't use express for my app. Is there any other way to not set the port to a fixed number?