简体   繁体   中英

Heroku foreman appears to start but nothing happens

I'm working through the Heroku tutorial for deploying a Python app and am trying to run my app locally on a Windows 7 64 bit machine. Using foreman to start the app appears work and has no visible errors but doesn't do anything.

Procfile.Windows:

web: python manage.py runserver 0.0.0.0:5000

Foreman output:

(HerokuGettingStarted) PS C:\localApp\> foreman start web -f .\Procfile .windows
08:16:04 web.1  | started with pid 6080
08:16:15 web.1  | Performing system checks...
08:16:15 web.1  |
08:16:15 web.1  | System check identified no issues (0 silenced).

If I do a netstat, there's nothing listening on localhost port 5000. However if I start the server manually, it works and I can connect to the app with a browser or telnet.

(HerokuGettingStarted) PS C:\localApp\> python manage.py runserver 0.0
.0.0:5000
Performing system checks...

System check identified no issues (0 silenced).
June 25, 2015 - 08:39:07
Django version 1.8.1, using settings 'gettingstarted.settings'
Starting development server at http://0.0.0.0:5000/
Quit the server with CTRL-BREAK.

I had the exact same issue. The easiest work-around for this is to just manually run py manage.py runserver and you'll be able to run everything locally.

Though the only thing that might not work in the same way is the setting of "config vars", as stated in Getting Started with Python on Heroku

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM