163
社区成员
发帖
与我相关
我的任务
分享
Flask
gunicorn
from flask import Flask
import os
app = Flask(__name__)
port = int(os.getenv("PORT", 12345))
@app.route('/')
def hello_world():
return 'Hello World'
if __name__ == '__main__':
app.run(host='0.0.0.0', port=port)
port = int(os.getenv("PORT", 12345))
---
applications:
- name: hello-world-python
memory: 128MB
disk_quota: 256MB
random-route: true
buildpack: python_buildpack
command: python hello.py
cf push