Articles of heroku toolbelt

来自Heroku Toolbelt的工头,出现错误:每次都写EINVAL

继Heroku的入门教程之后,我的预期就更令人沮丧了。 我现在所拥有的可能是一个configuration问题,它可能只需要不到10次点击就可以解决,但是我不知道这些点击是什么,这使我很快就陷入困境。 工头不会启动。 我没有使用Ruby,Heroku或Foreman的经验,也没有使用networking编程的经验,所以我完全不知道这里发生了什么。 这是我得到的错误信息,运行Windows 7 64位: C:\Users\___________\hello_world_basics>foreman start 09:40:17 web.1 | started with pid 2408 09:40:18 web.1 | Listening on 5000 09:40:18 web.1 | 09:40:18 web.1 | Error: write EINVAL 09:40:18 web.1 | at errnoException (net.js:904:11) 09:40:18 web.1 | at Socket._write (net.js:645:26) 09:40:18 web.1 | at doWrite (_stream_writable.js:226:10) 09:40:18 web.1 | at writeOrBuffer (_stream_writable.js:216:5) […]

启动工头错误(Dotenv :: FormatError)

我试图让一个node.js应用程序开始使用工头。 我在项目根目录中运行forman start命令,并且不断收到以下错误消息: /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/dotenv-0.8.0/lib/dotenv/environment.rb:34:in `block in load': Line "== project-ps Config Vars" doesn't match format (Dotenv::FormatError) from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/dotenv-0.8.0/lib/dotenv/environment.rb:27:in `each' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/dotenv-0.8.0/lib/dotenv/environment.rb:27:in `load' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/dotenv-0.8.0/lib/dotenv/environment.rb:23:in `initialize' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/foreman-0.63.0/lib/foreman/engine.rb:172:in `new' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/foreman-0.63.0/lib/foreman/engine.rb:172:in `load_env' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/foreman-0.63.0/lib/foreman/cli.rb:136:in `load_environment!' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/foreman-0.63.0/lib/foreman/cli.rb:38:in `start' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/thor-0.18.1/lib/thor/command.rb:27:in `run' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/thor-0.18.1/lib/thor/base.rb:439:in `start' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/gems/foreman-0.63.0/bin/foreman:7:in `<top (required)>' from /Users/Hebime/.rvm/gems/ruby-1.9.3-p448/bin/foreman:23:in […]

在Heroku上设置node.js服务器的端口

我使用以下行启动了一个node.js服务器来设置端口: app.set('port', process.env.PORT || 8080); 这意味着,它应该读取PORT envvariables或默认为8080,就像在本地运行一样。 在Heroku上它们都没有发生,服务器总是使用默认的端口80.任何想法如何改变它? heroku config PORT: 8080