0

I am trying to setup heroku deploy using gulp...

2015-05-31T12:39:43.160121+00:00 app[web.1]: [12:39:43] Webserver started at http://localhost:24018

2015-05-31T12:39:43.208954+00:00 app[web.1]: [12:39:43] Finished 'serve' after 544 ms

2015-05-31T12:40:39.255239+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

2015-05-31T12:40:39.255427+00:00 heroku[web.1]: Stopping process with SIGKILL

as per the logs webserver does get started successfully at given port.. below is how I am getting

 port: process.env.PORT || 8080,

so is there any other port heroku expects application start or is there a way one can know which port heroku is checking??

note : the app does starts successfully if I do forman start web, so what can be the issue here?? though forman starts the application at a port 5000. I tried to hardcore port to 5000 but still got the same error as above...

harishr
  • 17,807
  • 9
  • 78
  • 125

1 Answers1

0

the problem was i am using gulp-webserver which defaults to localhost, just need to change that to host: '0.0.0.0'

gulp.task('heroku', ['wiredep','inject'], function () {
  return gulp.src(config.base)
    .pipe(plugins.webserver({
        host: '0.0.0.0', 
        port: process.env.PORT,
        livereload: false,
        open: false
    }));
});
harishr
  • 17,807
  • 9
  • 78
  • 125