Closed buck-0x closed 9 years ago
Can you paste what you see in the logs, @redthrawn? Do you have the Twitter and Slack tokens set?
I have the tokens set.
https://gist.github.com/redthrawn/178b1b73ed7afaa49509
In Heroku I just have the two default dynos: https://www.dropbox.com/s/b0iocablfubxx5f/Screenshot%202015-07-07%2021.40.17.png?dl=0
I don't really have any experience with node or web deployments so odds are I'm just doing something stupid.
I just pushed a fix that should address this. Can you update and let me know?
I'm not sure if it's the same but it still doesn't work. Here is the log: https://gist.github.com/redthrawn/12ce51cccc5e1e723bff
I should just be able to run it locally by setting the environment vars and executing 'node slack-twitter.js' correct?
Yes, you should be able to run it locally with environment variables set.
It looks like, at the very bottom of the log, that it's connecting. Do you see tweets in your Slack channel and/or are you able to post to Twitter?
Now it works when I run it locally, just not through Heroku.
$ heroku ps
=== node (Free): node slack-twitter.js
node.1: idle 2015/07/07 21:57:59 (~ 29m ago)
=== web (Free): npm start
web.1: crashed 2015/07/07 22:22:02 (~ 5m ago)
@redthrawn It's up to date on Heroku? I committed a change to the package.json file that should start it properly.
OK it is working now. I directly linked GitHub with Heroku. For some reason it doesn't work when I manually clone the repo to my desktop and push with git and the Heroku command line tools. I had made the changes that you make to the JSON file. Not too sure what's up there but it is working now. Thanks a lot for your speedy help.
I spoke too soon. The problem is that it crashes after a timeout. https://gist.github.com/redthrawn/00bb15f1d5dd0a958b76
From the logs it looks like 60 seconds.
Are you running it as a web dyno or a node dyno? There's no web component of it, so it should just be a node dyno.
That is defined in the Procfile right? I am running it as a node dyno.
OK, I see what you mean. I get this: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
if I deploy using the button. Web dynos were initially deployed, despite my Procfile.
In the meantime, this should work, if you have the Heroku toolbelt installed:
heroku ps:scale web=0
heroku ps:scale node=1
You might need to do -a AppNameHere
as well. You should be able to do that through the app's web management interface too.
Let me know if that works. I might be out of luck with regards not so much turning off the 'web' dyno but setting how many 'node' workers are deployed clicking using the deploy button. http://stackoverflow.com/questions/28128018/can-i-set-the-number-of-worker-processes-in-app-json
OK got if figured out. After you added "start" to that file, I had to go back to Heroku and shut off the "start npm" dyno, which was on there by default.
Here is the live log, there is some sort of error but it doesn't seem to be a problem. https://gist.github.com/redthrawn/8df2d11df3a0fca2a9f3
Also the web page for the app says it doesn't work but it is.
Here is the build log: https://gist.github.com/redthrawn/bdc27f99e17668469298
Thank you so much for your help.
When I run the log I can see that npm start crashes almost immediately. Did you come across this?