This is a server component that handles some business logic and mediates between frontend and database interfaces.
- Python 2.7.10 is required.
- To install Python dependencies use
pip install -r requirements.txt
. Essentially we needflask
plus two pluginsflask-cors
andflask-login
,metapub
for PubMed import, and a fork ofpyhdb
, which is a yet-unmerged pull-request to the official pyhdb repository. - The server will assume that the database schema is set up properly.
- A valid
secrets.json
file is required in the root folder of the script. It should contain the address, port, and credentials information used to connect to the database (SAP HANA). A sample is given insecrets.json.example
. - For https, the server will look for a certificate (
certificate.crt
) and a key (certificate.key
) file in its root directory.
Simply run python server.py [staticdir='static/']
.
The optional parameter staticdir
is a path to a directory from which files will be available statically.
(See this repository for the embedded use case)