I recently built a Slack chatbot using this tutorial: https://youtu.be/jTaoU6u1Fcg
It worked great.
Now, I'm trying to run my bot on Heroku instead (so it works 24/7) but can't find anywhere online on how to do it.
The specific questions I need answered are:
What PORT do I add to my .env file now? (since I want it on a remote server public, I guess the answer isn't 3000 anymore)
Where (on Heroku) do I find the redirect URL for Oauth & Permissions?
Where (on Heroku) do I find the request URL for Event Subscriptions?
Will I still need to use ngrok or npm install? If I want the app to run 24/7, is Heroku enough?
Thanks for any help.
I just recently deployed a chatbot on heroku. The answers to your questions will be:
1. I kept the port same at 3000 and that will work on heroku as well.
2. I don't think you need to do anything on the heroku.
3. I don't think you need to do anything on the heroku.
4. ngrok wont work now but instead of ngrok url you will have add the url given by heroku (e.g. http://yourappname.herokuapp.com/) on your slack interactive elements and slash commands if you use them.
I hope this should fix your problem. One more thing there will be a proc file in heroku where you will have to give the entry path of your app.
Related
I hosted a telegram bot on heroku using webhook. It servers to scrape lyrics off a website. When I run the bot on my local machine, it is able to do so, however, when its hosted on Heroku, it keeps returning me element not found (I use beautiful soup). I have used different user-agents but to no avail. Any idea why?
If I have made 2 different heroku apps, can someone who randomly sees one also find the other and know that I made it? (They are not linking to each other of course)
Thanks!
If you look at Heroku Website you will notice that it is a deployment service for developers equipped with all required tools. On Heroku there is no way to find who is registered with Heroku or list of registered apps on Heroku just like Github.
So Github has a different service model, and we can easily search any repo, any author (if public). On Heroku there is no area or option to search like that.
Except that, if you are using Heroku for free and their free domain, then the prefix in start of your free domain name will let others know that you are using Heroku platform (with free package or have not configured real domain yet).
Twilio a famous SMS API service provider, has their chat service hosted on Heroku, they didn't configured the domain, hence I noticed Herokuapp in start of their chat window URL, which let me know that they are using Heroku.
I'm trying to migrate from Parse.com service to a self-hosted Parse Server, and it's been a bit difficult.
Basically I set up my server like this:
Run $ npm install -g parse-server
Set env vars (PARSE_SERVER_DATABASE_URI, PARSE_SERVER_MASTER_KEY, PARSE_SERVER_APPLICATION_ID)
Run $ parse-server
Everything is up and running, and I also setup a machine running parse-dashboard in a very similar way.
I had already synced the database and had no problems with it.
The problem is that when I try to send a push notification, I get the message:
Missing push configuration
I believe that's connected to the APNS settings. In Parse.com dashboard we can add the APNS certificates, but on the self hosted dashboard there is no such option (or I couldn't find it).
What am I missing? How do I set theses things up?
I believe that running parse-server without the recommended Express wrapper does not give me full control of everything I needed to configure the application.
I created an Express app, started the serving using the guide #thailey01 suggested and now it works.
I find plenty of information on deploying Twilio to a new Heroku app, thereby creating it. I'm a little stuck on the process of deploying it to an app that I already have. My app has a lot of data in the database there and I don't want to have to recreate it all. Additionally I would like my app to serve PHP pages as well. Do I need 3 Heroku apps now then? Doesn't make sense!
Twilio developer evangelist here.
You don't need to build a new application to use Twilio on Heroku. If you already have your existing application all you need to do is add the relevant endpoints for receiving SMS messages and voice calls from Twilio and deploy to your existing Heroku deployment. It is recommended that you load your Twilio Account SID and Auth Token into the Heroku config so that you can use them there too.
Is there anything specific you need to know about this? What is the application you have already built?
I'm trying to use the Play Framework starting with the WebSocket Chat Example founded here:
https://github.com/playframework/playframework/tree/2.0/samples/scala/websocket-chat
In particular this review of the last Play Framework version:
https://github.com/Shauli10/websocket-chat
I have deployed it on a Free Heroku Account, you can visit it ad this address:
https://desolate-shelf-8169.herokuapp.com
the problem is that when I insert the name, and I chat some message I can't see anything of what i send in the chat, and I can't also see the Robot that in the example type every 30 seconds a message, what I wrong? there is something I have to enable on Heroku for the WebSocket?
thanks
I notice that if I change the https part of the url to http (i.e. http://desolate-shelf-8169.herokuapp.com) your app seems to work. I'm not entirely sure why, but I know some browsers are picky about this with websockets.
Websockets should work on Heroku out-of-the-box. There is nothing that needs to be enabled.
Also, when I tried the template app:
$ git clone git#github.com:Shauli10/websocket-chat.git
$ heroku create
$ git push heroku master
It seems to "just work". If you are still having trouble, can you explain what you have changed in the template?