0

I asked this question and it seems pythonanywhere doesn't support websockets.

pythonanywhere - How do I use websockets to transmit messages as per the web2py messaging example?

so the question is where could I deploy the app as effortlessly as possible?

right now when I run it locally its as easy as

python web2py.py &
python websocket_messaging.py -p 8888 -k mykey
Community
  • 1
  • 1
evan54
  • 3,585
  • 5
  • 34
  • 61

1 Answers1

2

It's not going to be as easy as pythonanywhere, but you could deploy to any VPS, such as Digital Ocean. To make things easier, use one of the web2py deployment scripts, such as https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh. Once you have the basic server set up, you'll still need to install Tornado and follow the other instructions for using websocket_messaging.py.

Anthony
  • 25,466
  • 3
  • 28
  • 57
  • After running the script I'm guessing I'll also need to install tornado right? – evan54 Aug 19 '15 at 23:25
  • and will the `websocket_send` and `web2py_websocket` functions send/listen on localhost (127.0.0.1)? – evan54 Aug 20 '15 at 03:14
  • so I ended up going the digital ocean route, got myself set up quickly and I'm out a bit of money I guess. The main thing was I needed to change where I'm sending stuff with websockets and nginx has a weird thing where it doesn't allow uploads. Anyway sorted, thanks – evan54 Aug 20 '15 at 10:27