Skip to content
Snippets Groups Projects
Commit c39fc986 authored by Christian Boettcher's avatar Christian Boettcher
Browse files

add frontend description ot the readme

it's as incomplete as the frontend itself
parent 34f3e689
No related branches found
No related tags found
No related merge requests found
Pipeline #68675 failed
......@@ -5,6 +5,23 @@ This is Data Catalog for eFlows4HPC project
Find architecture in [arch](arch/arch.adoc) folder.
## Frontend Server for the Data Catalog
[This](frontend/) part is the frontend for the Data Catalog. It will be the user interface, so that no one is forced to manually do http calls to the api. Since the content is managed by the [api-server}(apiserver/), this can be deployed as a static website, containing only html, css and javascript. To make the different pages more uniform and avoid duplicate code, the static pages will be generated by the [jinja2](https://jinja.palletsprojects.com/en/3.0.x/templates/) template engine.
To compile the static pages to the `./site/` directory (will be created if required), simply run
```bash
pip install -r requirements.txt
python frontend/createStatic.py
```
The site can then be deployed to any webserver that is capable of serving files, as no other server functionality is strictly required. However, in a proper deployment, access and certificates should be considered.
For development (and only for development), an easy way to deploay a local server is
```shell
python -m http.server <localport> --directory site/
```
## API-Server for the Data Catalog
[This](apiserver/) part is the the API-server for the Data Catalog, which will provide the backend functionality.
......
......@@ -2,7 +2,7 @@ from jinja2 import Environment, FileSystemLoader
import os
import shutil
def main():
def render_template_to_site():
## copy javascript files to site folder
src_files = os.listdir('frontend/js')
dest = 'site/js'
......@@ -43,4 +43,4 @@ def main():
f.write(html[file])
if __name__ == "__main__":
main()
\ No newline at end of file
render_template_to_site()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment