From e5436ef8de1d17d2b97600f387f17e8000003ab6 Mon Sep 17 00:00:00 2001 From: JORGE SASIAIN <jorge.sasiain@ehu.eus> Date: Wed, 28 Jun 2023 12:57:39 +0000 Subject: [PATCH] Update README.md --- README.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4d98b72..e3215d4 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,9 @@ resource management tooling & experiments standalone on your local machine (will be merged into the full docs later)* -### database setup - - * set the value of `sqlalchemy.url` - in `alembic.ini` to point to a writeable file, e.g. - ```python - sqlalchemy.url = sqlite:////absolute/path/to/foo.db - ``` - * create the database by running the alembic - migration from the top-level directory - ```bash - alembic upgrade head - ``` - -### running the app + * install dependencies: run ``pip install -e .`` and ``pip install -r requirements.txt`` +### configuration * create a settings filename (see `config-example.json` for an example) ... something like: @@ -37,8 +25,25 @@ merged into the full docs later)* } } ``` + * In the config file, set the value of `db` to point to a writeable file, e.g. ``sqlite:////absolute/path/to/foo.db`` + + +### database setup + + * export `SETTINGS_FILENAME`, e.g. + ```bash + SETTINGS_FILENAME=/absolute/path/to/config.json + ``` + * create the database by running the alembic + migration from the top-level directory + ```bash + alembic upgrade head + ``` + +### running the app + * run the app like this - (`app.py` starts the server on port 44444): + (`app.py` starts the server on port 44445): ```bash SETTINGS_FILENAME=/absolute/path/to/config.json python -m resource_management.app ``` @@ -47,11 +52,11 @@ merged into the full docs later)* * get the version ```bash - curl http://localhost:44444/api/version + curl http://localhost:44445/api/version ``` * load interfaces from a router ```bash - curl -X POST http://localhost:44444/api/initialize-router/router.host.name + curl -X POST http://localhost:44445/api/initialize-router/router.host.name ``` * view the docs by loading `http://localhost:44444/docs` in your browser (there are requests for reserving -- GitLab