Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

.. -*- mode: rst -*-


This is a scrabble clone which uses HTML5's Canvas for the UI and Django and
Eventlet for the server. The goal is to make a scrabble clone which works on
iOS, Android and desktop machines.


There currently isn't a publicly accessible server, but you can run your own
server. Make sure you have redis running, see example_project/ if
you want to change the redis settings. Then you can run the following commands
to get a running server::

  $ sudo apt-get install python-virtualenv python-pip python-dev build-essential redis-server zip # Dependencies for Ubuntu
  $ hg clone
  $ cd scrabble
  $ virtualenv --no-site-packages env
  $ source env/bin/activate
  $ pip install -r example_project/requirements.txt
  $ (cd data; ./
  $ python example_project/ syncdb
  $ gunicorn_django -k gunicornsupport.EventletWorker example_project/

You should now have a server running at http://localhost:8000/

Alternative WSGI Servers

If gunicorn isn't your thing, you can use eventlet.wsgi by just running::

  $ python

or use spawning::

  $ spawning --processes=1 --threads=0 -p 8000 run.application


This section will explain deployment of the example application using nginx
and gunicorn. Follow the same steps as in the install section to setup the
example scrabble project. The next few steps assume the repository is cloned
into /home/ubuntu/scrabble. If it isn't you will need to modify the

  $ sudo apt-get install nginx
  $ sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
  $ sudo cp data/nginx.conf /etc/nginx
  $ sudo /etc/init.d/nginx restart
  $ cp example_project/ example_project/
  $ vim example_project/ # Atleast change SECRET_KEY
  $ python example_project/ syncdb
  $ python example_project/ collectstatic
  $ gunicorn_django -c data/ example_project/

You should now have a server running at http://localhost/

This setup uses nginx to serve the static files, as well as reverse proxy
requests to gunicorn.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.