Skip to content

Commit

Permalink
Add how to connect to Galaxy section
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 4, 2024
1 parent 1605fee commit 42008ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
]
},
Expand Down
26 changes: 17 additions & 9 deletions docs/content/configuration.md
Original file line number Diff line number Diff line change
@@ -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.**

0 comments on commit 42008ba

Please sign in to comment.