minarepo's web viewer!!
- database: mysql 5.7
- server:
- python 2.7
- bottle (web app framework)
- Jinja2 (template language)
- client responsive framework(css+js): Zurb Foundation
- client logic: React.js + Fluxxor
- client css: SCSS
- modify server side: edit minarepoviewer/server.py and minarepoviewer/dbaccess.py
- modify server html: edit minarepoviewer/template/index.html.j2 (note: template language is Jinja2)
- modify images: see minarepoviewer/static/img/*
- modify client logic: edit minarepoviewer/static/jsx/mrv.jsx and make sure compile it into mrv.js by jsx command
- modify css: edit minarepoviewer/static/scss/mrv.scss and make sure compile it into mrv.css by sass command
-
keep sass running to compile mrv.scss file into mrv.css like:
$ cd minarepoviewer/static $ sass --scss --watch ./scss:./css
You need react-tools to compile .jsx file into .js file.
$ npm (-g) install react-tools
$ cd minarepoviewer/static
$ jsx -x jsx --watch ./jsx ./js
Install mysql and keep it running on your machine.
If you are using Mac:
$ brew install mysql
$ brew services start mysql
Then create database for the application.
$ mysql -u root
> CREATE DATABASE FujisawaMinaRepo;
soxfujisawa$ mysqldump -u soxfire -p FujisawaMinaRepo > ~/dump.sql
local$ scp soxfujisawa:~/dump.sql /tmp/
local$ mysql -u root FujisawaMinaRepo < /tmp/dump.sql
- install pip ( sudo easy_install pip )
- install virtualenv ( sudo pip install virtualenv )
- create virtualenv with dir name ".venv" under project dir (ignored by .gitignore)
- activate virtualenv (source ./.venv/bin/activate)
- install depending libraries (pip install -r ./requirements.txt)
next time, you just activate virtualenv.
$ cp ./mysql.secret.json.template ./mysql.secret.json
$ (edit mysql.secret.json)
$ python ./minarepoviewer/server.py -m ./junk/mysql.secret.json
Then MinaRepoVewier will runs on http://localhost:3780/
see schema.sql
or
use desc minarepo;
command in MySQL command line.