Orlando
Orlando

Reputation: 487

heroku running app with python

everyone.

I´m trying to follow the Heroku Heroku with Python getting started guide (https://devcenter.heroku.com/articles/getting-started-with-python#run-the-app-locally). And I need to run the app locally as part of this process. So i follow the tutorial, and put "heroku local web -f Procfile.windows" in the CMD, but it generate the error

(venv) C:\Users\yuniorperalta\python-getting-started>heroku local web -f Procfile.windows
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[DONE] Killing all processes with signal  null
2:58:19 PM web.1 Exited with exit code 1

And I can´t undertand what happens. My version of python is 3.5.2, then I modify the runtime.txt file writing "python-3.5.2" but doesnt works. So, I dont know why is not working.

And a second question: How can I put the app to run in the cloud and be accesable from a smartphone? (Thats my final and prior objetive)

If you can help me, I´ll be grateful

Best

Upvotes: 0

Views: 133

Answers (1)

Papouche Guinslyzinho
Papouche Guinslyzinho

Reputation: 5468

Your Procfile.windows should contains this.

web: python manage.py runserver 0.0.0.0:5000

So you could easily instead of the Heroku command to do this.

python manage.py runserver

then open your web browser to this address http://127.0.0.1:5000/ or http://localhost:5000/

Upvotes: 1

Related Questions