Index: .gitignore
===================================================================
--- .gitignore	(revision 0398a0c571b8dbc6f7e30d42b6a7531f8241a025)
+++ .gitignore	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -59,5 +59,13 @@
 var/log/zeo_stop.err
 var/log/zeo_stop.log
+var/log/uwsgi/uwsgi.log
+
+# pid files
 var/run/pserve.pid
+var/run/uwsgi.pid
+
+# temp files
+var/tmp/chameleon/*
+var/tmp/egg_cache/*
 
 # JS static external components and libraries
Index: bin/install
===================================================================
--- bin/install	(revision 0398a0c571b8dbc6f7e30d42b6a7531f8241a025)
+++ bin/install	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -94,4 +94,11 @@
 }
 
+create_temp_dirs() {
+    # Creates the tmp directory where cache files are stored
+    echo "Creating tmp and cache directories ${current}/var/tmp"
+    mkdir -p ${current}/var/tmp/chameleon
+    mkdir -p ${current}/var/tmp/egg_cache
+}
+
 setup_mail_server() {
     echo ""
@@ -152,3 +159,4 @@
 setup_mail_server
 create_cron_job
+create_temp_dirs
 setup_start_stop
Index: bin/start
===================================================================
--- bin/start	(revision 0398a0c571b8dbc6f7e30d42b6a7531f8241a025)
+++ bin/start	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -13,4 +13,5 @@
 
 ctrl_c() {
+    ./bin/uwsgi_stop
     ./bin/zeo_stop
 }
@@ -32,9 +33,8 @@
 # And finally run the server
 echo "Starting OpenWorkouts"
-pserve --reload development.ini >> var/log/pserve.log 2>> var/log/pserve.err &
-echo $! > var/run/pserve.pid
+./bin/uwsgi_start development
 
 # show the url where the app is accesible
-ow_url=http://`grep listen development.ini |cut -f 3 -d " "`
+ow_url=http://`grep http etc/uwsgi_development.ini |cut -f 3 -d " "`
 echo "Open this url in your browser to access the app: ${ow_url}"
 # open ${ow_url}
Index: bin/uwsgi_start
===================================================================
--- bin/uwsgi_start	(revision 0398a0c571b8dbc6f7e30d42b6a7531f8241a025)
+++ bin/uwsgi_start	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -5,4 +5,8 @@
 
 case "$1" in
+    'development')
+        uwsgi --ini etc/uwsgi_development.ini
+        echo "Started uwsgi, check var/log/uwsgi/uwsgi.log for more info"
+        ;;
     'staging')
         uwsgi --ini etc/uwsgi_staging.ini
Index: etc/development.wsgi
===================================================================
--- etc/development.wsgi	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
+++ etc/development.wsgi	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -0,0 +1,11 @@
+import os
+from pyramid.paster import get_app, setup_logging
+
+current_path = os.path.dirname(os.path.abspath(__file__))
+
+os.environ['CHAMELEON_CACHE'] = os.path.join(current_path, '../var/tmp/chameleon/')
+os.environ['PYTHON_EGG_CACHE'] = os.path.join(current_path, '../var/tmp/egg_cache')
+
+ini_path = os.path.join(current_path, '../development.ini')
+setup_logging(ini_path)
+application = get_app(ini_path, 'main')
Index: etc/uwsgi_development.ini
===================================================================
--- etc/uwsgi_development.ini	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
+++ etc/uwsgi_development.ini	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -0,0 +1,19 @@
+[uwsgi]
+http = 0.0.0.0:9999
+daemonize = $(PWD)/var/log/uwsgi/uwsgi.log
+pidfile = $(PWD)/var/run/uwsgi.pid
+processes = 2
+threads = 10
+master = true
+lazy = true
+ftok = %p
+virtualenv = $(PWD)/env
+env = PYTHON_EGG_CACHE=$(PWD)/var/tmp/egg_cache
+manage-script-name = true
+mount=/=$(PWD)/etc/development.wsgi
+; disable requests log (GET/POST)
+disable-logging = true
+; set the log file for all the other logging
+logto = $(PWD)/var/log/uwsgi/uwsgi.log
+; SIGTERM exists, instead of a dirty reload
+die-on-term = true
Index: var/log/uwsgi/README
===================================================================
--- var/log/uwsgi/README	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
+++ var/log/uwsgi/README	(revision 8ee2af57d520cfb93d5716c9271d364143c0c368)
@@ -0,0 +1,1 @@
+uwsgi log files
