heroku使用gulp - 在日志中没有错误 - 仍然 [英] heroku using gulp - no error in logs - still
问题描述
2015-05-31T12:39:43.160121 + 00:00我试图设置heroku使用gulp进行部署app [web.1]:[12:39:43] Web服务器
始于 http:// localhost:24018
2015-05-31T12:39:43.208954 + 00:00
app [web.1]:[12:39:43] Finished'serve '544 ms后
2015-05-31T12:40:39.255239 + 00:00 heroku [web.1]:错误R10(启动
超时) - > Web进程无法在
启动后的60秒内绑定到$ PORT
2015-05-31T12:40:39.255427 + 00:00 heroku [web。 1]:使用SIGKILL停止
过程
根据日志web服务器在给定端口成功启动..下面是我如何得到
port:process.env.PORT || 8080,
那么有没有其他端口heroku预计应用程序启动还是有一种方法可以知道哪个port heroku正在检查??
注意:如果我做了 forman start web
,应用程序确实启动成功可能是这里的问题?尽管 forman
在端口5000启动应用程序。我试图将端口硬编码为5000,但仍然得到了与上面相同的错误...
<解决方案
问题是我使用的gulp-webserver默认为localhost,只需要将其更改为 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
}));
});
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...
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
}));
});
这篇关于heroku使用gulp - 在日志中没有错误 - 仍然的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!