Refactor of miao_fm
- Python 2.7.5
- mongodb 2.4.8
- Flask==0.10.1
- Flask-RESTful==0.2.8
- Flask-Script==0.6.6
- mongoengine==0.8.6
- requests==2.1.0
- APScheduler==2.1.1
# You need to install Python, pip, virtualenv, MongoDB first.
virtualenv doufm
cd doufm
git clone https://github.com/DouFM/wang_fm
pip install -r wang_fm/requirements.txt
. bin/activate
cd wang_fm
python manager.py setup
python manager.py auto_update # Download demo music, this needs to be stopped manually
python manager.py runserver
use nose to test all.
run nosetests -vv
usage: manager.py [-h]
{shell,enable_channel,update_channel_num,setup,runserver,channels,auto_update,tasks,disable_channel}
...
- use
./manager.py setup
to setup db. - use
./manager.py runserver
to run server. (This needs to keep running) - use
./manager.py tasks [-h] hour
to run tasks. (This needs to keep running)