Skip to content
ViLiMan edited this page Aug 22, 2015 · 63 revisions

Welcome to the rameplayer wiki!

The foremost purpose of this wiki is to define the interactions between different services and GUI.

Services: omx_server
lcd_server
media_indexer (reads the metadata)
downloader (downloader manager for online media)

REST calls

edit

Installing Python Flask web framework in Raspian:

This describes method on running Python Flask code under apache daemon trough mod_wsgi interface:

1 Install mod_wsgi (for python2 code)

apt-get install libapache2-mod-wsgi

2 Copy the .wsgi file (and ofcourse the .py file) copy the

/rameplayer/webgui/vili/api/rest_server.wsgi

to directory

/var/www/api

Reference: http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/

3 Copy apache configuration

(.httaccess approach didn't work and when running with RaspberryPi have access anyway to apache main config)

copy the

platforms/raspian/etc/apache2/sites-available/default

to

/etc/apache2/sites-available/default

it contains the (api) Directory directive and pointer for .wsgi file that points to Python Flask code.

Installing Python Flask web framework in Mac and running as it own webserver (for development):

sudo easy_install pip

sudo pip install Flask

python rest_server.py

Things to consider:

  • REST API only answer 192.168.. or 10...* calls?
  • Disable the download possibility of py and wsgi files?

Clone this wiki locally