alguien puede ayudar a servir una aplicación en bottle, con nginx o de cualquier manera
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Building off the article that Etel linked to, a “Hello World” Bottle app might look like: <pre> from bottle import route, run
@route(‘/hello’) def hello(): return “Hello World!”
run(host=‘0.0.0.0’, port=3000) </pre> You can set the port to anything you want. Now we can use Nginx as a reverse proxy. You Nginx configuration would look something like: <pre> upstream app_server { server 127.0.0.1:3000 fail_timeout=0; }
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on;
} </pre> Note that the upstream directive is on the same port as the Bottle app.
To get Nginx installed in the first place, check out:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-14-04-lts
We have an article on bottle here: https://www.digitalocean.com/community/tutorials/how-to-use-the-bottle-micro-framework-to-develop-python-web-apps
anyone can help to serve an application bottle, with nginx or otherwise