Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(dashboard): Add info boxes #687

Merged
merged 2 commits into from Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/reference/db/configuration.md
Expand Up @@ -260,6 +260,12 @@ Supported object properties:

- **`rootPath`** (`boolean`, default: `true`) — Make the dashboard available at the root path (`/`).

:::tip

Read the [dashboard docs](/docs/reference/db/dashboard) to understand how to create a build or have the Vite's development server up and running.

:::

### `metrics`

Configuration for a [Prometheus](https://prometheus.io/) server that will export monitoring metrics
Expand Down
18 changes: 18 additions & 0 deletions docs/reference/db/dashboard.md
Expand Up @@ -2,8 +2,20 @@

The Platformatic DB has a dashboard used to do several actions like see the current configuration and access documentation for your generated API.

:::info

Be sure to set `dashboard: true` on your `platformatic.db.json`, as mentioned on the [config docs](/docs/reference/db/configuration/#dashboard).

:::

It also integrates GraphiQL, to run queries and mutations against Platformatic DB Server.

:::tip

As mentioned on the [config docs](/docs/reference/db/configuration#metrics), adding `metrics: true` will allow to add also the Platformatic metrics to the dashboard.

:::

## Development Server

If you want to contribute on the dashboard, it needs to know where is Platformatic DB Server.
Expand All @@ -15,6 +27,12 @@ VITE_SERVER_URL=http://localhost:3042

Or whatever port you are running platformatic DB server on.

:::note

Please double check the host too: if platformatic is running on `127.0.0.1` and you set `localhost` as `VITE_SERVER_URL`, you'll get CORS errors.

:::

Then run
```sh
pnpm run dashboard:start
Expand Down