new style, first version (header, login, dashboard)
[myslice.git] / devel / server-loop.sh
1 #!/bin/bash
2 DIRNAME=$(dirname $0)
3 cd $DIRNAME/..
4
5 # default port : if hostname starts with z -> use 8080 ; otherwise take 80
6 hostname | grep -q '^z' && port=8080 || port=8080
7 [[ -n "$@" ]] && port=$1
8
9 while true; do 
10     # we use make for convenience
11     # but what the static target really does is to invoke manage.py collectstatic 
12     make static templates
13     ./manage.py runserver 0.0.0.0:$port
14         sleep 1
15 done