简体   繁体   English

Heroku工头似乎开始,但什么也没发生

[英]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. 我正在通过Heroku教程来部署Python应用程序,并试图在Windows 7 64位计算机上本地运行我的应用程序 Using foreman to start the app appears work and has no visible errors but doesn't do anything. 使用领班来启动应用程序似乎可以正常工作,并且没有可见错误,但是什么也没做。

Procfile.Windows: 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. 如果我执行netstat,则不会在本地主机端口5000上监听任何内容。但是,如果我手动启动服务器,则服务器可以工作,并且可以使用浏览器或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. 最简单的解决方法是手动运行py manage.py runserver ,您就可以在本地运行所有内容。

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 尽管唯一无法以相同方式工作的是“ config vars”的设置,如Heroku上的Python入门中所述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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