Skip to content

Commit 4ac94e6

Browse files
committed
chore: add JSON user config defaulting to using local Astarte instance
Add a default JSON configuration that the dashboard automatically discovers when running it with `npm run start`, i.e. for local development. The configuration assumes a local Astarte instance being available, for example by following the official "Astarte in 5 minutes" guide from Astarte's documentation. This change is aimed at improving the developer experience, so that the dashboard is ready to be used out of the box with a local Astarte, provided that the user already has a realm and an associated access token. Signed-off-by: Davide Briani <davide.briani@secomind.com>
1 parent fc504ae commit 4ac94e6

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24-
25-
/public/user-config

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Astarte Dashboard is written in TypeScript using the React framework and npm to
150150
```sh
151151
npm install
152152
```
153-
3. Place your configuration file in `src/user-config/config.json`
153+
3. Place your configuration file in `public/user-config/config.json`
154154
4. Start the dev server
155155
```sh
156156
npm run start

public/user-config/config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"astarte_api_url": "http://api.astarte.localhost",
3+
"default_auth": "token",
4+
"enable_flow_preview": false,
5+
"auth": [
6+
{
7+
"type": "token"
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)