From 42008bab08a21bf7862f2c457f4799c4804a3de1 Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 4 Nov 2024 13:13:17 +0300 Subject: [PATCH] Add how to connect to Galaxy section --- docs/.vitepress/config.mts | 4 ++-- docs/content/configuration.md | 26 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 2274b6d..7618bf2 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -17,8 +17,8 @@ export default defineConfig({ text: 'Getting Started', items: [ { text: 'What is Galaxy Charts?', link: '/content/introduction' }, - { text: 'Installation', link: '/content/installation' }, - { text: 'Connect to Galaxy Instance', link: '/content/configuration' }, + { text: 'Start Developing', link: '/content/installation' }, + { text: 'Connect to Galaxy', link: '/content/configuration' }, { text: 'Examples', link: '/content/examples' }, ] }, diff --git a/docs/content/configuration.md b/docs/content/configuration.md index 7966a36..e28ef43 100644 --- a/docs/content/configuration.md +++ b/docs/content/configuration.md @@ -1,14 +1,22 @@ # Connect to Galaxy -Galaxy Charts can be used to develop Visualizations independently of Galaxy. However, visualization may access to the Galaxy API in order to retrive datasets, metadata or run jobs. In the Galaxy Charts standalone application can be connected to the API of a local or public runnning Galaxy instance by providing the `GALAXY_API` route either as environment variable, when running Galaxy Charts: +Galaxy Charts can be used to develop visualizations independently of Galaxy. However, to access Galaxy datasets, metadata, or run jobs, the visualization may need to connect to the Galaxy API. -```md -GALAXY_API="http://127.0.0.1:8080/api" npm run dev -``` +To connect the Galaxy Charts standalone application to a Galaxy instance (either local or public), provide the following environment variables when running Galaxy Charts: + +- **`GALAXY_KEY`**: Your Galaxy API key. +- **`GALAXY_ROOT`**: The Galaxy server URL e.g. `https://127.0.0.1:8080` for a locally running Galaxy. + +Run the following command, replacing `MY_API_KEY` and `MY_GALAXY_SERVER` with your own values: -or by specifying the corresponding route in the `server.config.js` file as show here: -```md -export default { - GALAXY_API: "http://127.0.0.1:8080/api", -}; +```bash +GALAXY_KEY=MY_API_KEY GALAXY_ROOT=MY_GALAXY_SERVER npm run dev ``` + +## How to Obtain an API Key + +1. Navigate to your Galaxy instance and sign in. +2. Click on your username in the top navigation bar and select Preferences. +3. Scroll down to Manage API Key to create and access your personal API key. + +**Note: Treat your API key as securely as your login credentials.** \ No newline at end of file