- Set up a virtualenv
pip install flask- add
calc_server.py - debug/run with
python calc_server.py(autoreloading, debugging, etc.) - Access e.g.
http://localhost:9999/calculate/9652/343
- Set up a virtualenv
pip install flask gunicorn- Run in production mode with
gunicorn --bind=0:9999 calc_server:app - Ensure port 9999 (or whatever you choose) is open to the world in the EC2 security group
- Access e.g.
http://ec2-instance-ip-here:9999/calculate/9652/343
- Set up a systemd unit file for Gunicorn