iOS应用后端的web.py部署 [英] web.py deployment for iOS app backend

查看:75
本文介绍了iOS应用后端的web.py部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个iOS应用程序,该应用程序需要后端来提取数据.我已经使用Python,web.py和pymongo实现了后端.

I am currently developing an iOS application that needs a backend to pull data from. I have implemented the backend using Python, web.py and pymongo.

我将所有内容都部署在EC2实例上,为该实例分配了一个弹性IP,iOS设备调用该实例以访问后端,然后通过SSH通过SSH启动该应用程序:

I deployed everything on an EC2 instance, assigned an elastic IP to the instance that the iOS devices call to access the backend, and launch the application through SSH by doing:

nohup python main.py &

一切正常(每天有几十个用户,并且有增长的潜力;传输的数据很少超过几千字节),但是我想知道这是否是正确的处理方式.

Everything works fine (couple dozen users a day, with potential to grow; data transferred is rarely more than a few kilobytes), but I'm wondering if this is the proper way to do things.

例如,在web.py网站上,他们说明了将web.py与Apache,lightppd等结合使用的方式;这些只是特殊情况,还是我应该使用这些功能齐全的服务器之一来部署后端?

For instance on the web.py website, they explain ways to use web.py with Apache, lightppd etc.; are these just special cases, or should I be deploying my backend using one of those full featured servers?

推荐答案

我绝对会使用一台完整的Web服务器,而不是内置于web.py的Web服务器,尽管如果流量仍然很低,您现在就可以了.我认为web.py中内置的那个应该用于调试,而不是生产.

I would absolutely use a full web server rather than the one built into web.py, although you should be okay for now if the traffic remains low. I think the one built into web.py is supposed to be used for debugging, rather than production.

使用哪种服务器主要取决于用户的偏好,但是我喜欢 Nginx uWSGI .

It's mostly a matter of preference which of those servers you use, but I like Nginx with uWSGI.

这篇关于iOS应用后端的web.py部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆