-
Notifications
You must be signed in to change notification settings - Fork 262
Hosting a web app in the cloud
Almar Klein edited this page Jul 7, 2016
·
6 revisions
You can use Amazon EC2, Azure, or Google App Engine to host Flexx webs. This is a little guide to help you do that. It is assumed that you have SSH access to a Linux machine.
Installing Flexx should be as easy as:
$ python3 -m pip install flexx --upgrade
Or if you're using conda:
$ conda install flexx -c conda-forge
If you want the bleeding edge:
$ python3 -m pip install tornado
$ sudo apt-get install git-all
$ git clone https://github.com/zoofIO/flexx.git
You can start a demo server using:
$ python3 ~/flexx/ui/examples/serve_multipl1.py --flexx-port=8080
But that server will shutdown when you close the SSH connection. Therefore, use this to create a persistent server process:
$ nohup python3 ~/flexx/ui/examples/serve_multipl1.py --flexx-port=8080
To check and stop a running server, make a new ssh connection and do:
$ python3 -m flexx info 8080
$ python3 -m flexx stop 8080
I think you need to run this after each reboot.
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080