简体   繁体   English

将 python flask 项目部署到网站中

[英]Deploy python flask project into a website

So I recently finished my python project, grabbing values from an API and put it into my website.所以我最近完成了我的 python 项目,从 API 中获取值并将其放入我的网站。

Now I have no clue how I actually start the website (finding a host) and making it accessible to other people, I thought turning to here might find the solution.现在我不知道如何实际启动网站(寻找主机)并使其可供其他人访问,我认为转向这里可能会找到解决方案。

I have done a good amount of research, tried "pythonanywhere" and "google app engine" but seem to not really find a solution.我进行了大量研究,尝试了“pythonanywhere”和“google app engine”,但似乎并没有真正找到解决方案。

I was hoping to be able to use "hostinger" as a host, as they have a good price and a good host.我希望能够使用“hostinger”作为主机,因为他们有一个好的价格和一个好的主机。 Contacted them but they said that they couldn't, though I could upload it to a VPS (which they have).联系了他们,但他们说他们不能,尽管我可以将它上传到 VPS(他们有)。 Would it work for me to upload my files to this VPS and therefor get it to a website?将我的文件上传到此 VPS 并因此将其上传到网站对我有用吗? or should I use another host?还是我应该使用另一台主机?

A VPS would work, but you'll need to understand basic linux server admin to get things setup properly. VPS 可以工作,但您需要了解基本的 linux 服务器管理员才能正确设置。

Sounds like you don't have any experience with server admin, so something like App Engine would be great for you.听起来您对服务器管理没有任何经验,所以像 App Engine 这样的东西对您来说会很棒。 There are a ton of tutorials on the internet for deploying flask to GAE.互联网上有大量关于将 flask 部署到 GAE 的教程。

I just deployed my first app and used Heroku .我刚刚部署了我的第一个应用程序并使用了 Heroku I'm very happy with it so far and it was fairly straight forward to set up.到目前为止,我对此感到非常满意,而且设置起来相当简单。 It does require a basic git understanding but was not hard to learn它确实需要基本的 git 理解,但并不难学

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

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