【发布时间】:2017-12-30 16:30:25
【问题描述】:
在this tutorial 中,他们使用烧瓶创建了一个 API,您可以将其发布到该 API,它会给出响应。
然后它会告诉您创建一个调用 API 的 Angular 应用程序。
这将如何在 apache 服务器上工作?
本教程没有提到这一点,但我尝试在 apache 上使用 WSGI,它可以运行可以使用
重定向到 Angular 应用程序的烧瓶文件@app.route('/')
def index():
return render_template('index.html',content=content)
这是部署 Angular 和 Flask 应用程序的典型方式吗?烧瓶调用角度 index.html 似乎很奇怪,有没有办法以较低的耦合度做到这一点?
使用 Flask 作为 RESTful API 并在同一服务器上运行 Angular 的标准是什么?
【问题讨论】:
标签: apache angular flask flask-restful