anvaari / BarnameKon

Barname Kon is telegram bot which create "Add to Calendar" link (Google Calendat) and file (.ics) for your events.
https://t.me/BarnameKonBot
MIT License
8 stars 1 forks source link

A config file for being able to locally deploy the bot #4

Open HesamKorki opened 3 years ago

HesamKorki commented 3 years ago

A config file for Heruko credentials and other configs needs to be created and handled in the code in a way that deploying on a local machine for testing purposes is available.

anvaari commented 3 years ago

You are right. Actually I totally forgot that. I will add those file as soon as possible. Thanks :)

anvaari commented 3 years ago

Finally, I Find out. Please follow these steps in order to deploy locally.

I will add this to README.md soon. It's best way I can find. If any problem occurred please write it here, so we will handle that. Thanks :)

HesamKorki commented 3 years ago

Alright thanks. However, I found out that you don't really need flask cause telegram API provides HTTP server for deployment itself. The code would be so much simpler. I am currently working on a fork of the repository. Will do these steps if it was necessary.

anvaari commented 3 years ago

Actually, I didn't know anything about that. But If make code simpler, It's definitely better. I will read about that. Do you want to work on replacing Flask with that API ? If no, I will work on it.

HesamKorki commented 3 years ago

It would be great if you could make it simpler with that. I tried to host the bot using Ngrok and Heruko local as you mentioned but at the end it was not successful. All I need is a debugging environment so I could test the changes locally.

anvaari commented 3 years ago

I know, it is necessary for developing to run bot locally. I work on it and I hope, I can handle this soon. But until then, can you send me your edited version of Barnamekon.py and share screen shot of terminal after heroku local web? maybe I can help you with that

anvaari commented 3 years ago

I search for it, but can't find smth wich can make bot simpler. We should use webhook to interact with heroku. and here are some example which we can use to set up webhook. I think simplest is Flask. I try these steps, and bot run locally. please send me information which I mentioned in last comment to solve problem.