Skip to content

Commit 187daab

Browse files
committed
chore: add .env.example file
1 parent 70c806f commit 187daab

File tree

7 files changed

+31
-5
lines changed

7 files changed

+31
-5
lines changed

.env.example

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Source code URL.
2+
HARMONY_CODE_URL=
3+
# User support URL.
4+
HARMONY_SUPPORT_URL=
5+
# Base URL of the MusicBrainz API which should be used to request data.
6+
HARMONY_MB_API_URL=
7+
# Base URL of the MusicBrainz server which should be targeted (by links and for seeding).
8+
HARMONY_MB_TARGET_URL=
9+
# Current git revision of the app.
10+
DENO_DEPLOYMENT_ID=
11+
# Path to the directory where the app should persist data like snapshots.
12+
HARMONY_DATA_DIR=
13+
# Indicates whether the protocol of a client from the `X-Forwarded-Proto` proxy header should be used.
14+
FORWARD_PROTO=
15+
# Port to serve the app on.
16+
PORT=
17+
18+
# Provider API config
19+
20+
# Spotify app config. See https://developer.spotify.com/documentation/web-api
21+
HARMONY_SPOTIFY_CLIENT_ID=
22+
HARMONY_SPOTIFY_CLIENT_SECRET=
23+
# Tidal app config. See https://developer.tidal.com/reference/web-api
24+
HARMONY_TIDAL_CLIENT_ID=
25+
HARMONY_TIDAL_CLIENT_SECRET=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Alternatively you can run the [predefined task](deno.json) which automatically s
3939
deno task server
4040
```
4141

42-
Other environment variables which are used by the server are documented in the [configuration module](config.ts).
42+
Other environment variables which are used by the server are documented in the [configuration module](config.ts) and in the [`.env.example` file](.env.example). To get started, copy `.env.example` to `.env`. Most environment variables are optional and have default values in the code. To use some providers, you need to create an app with that provider. After which, you'll get a set of client credentials, which you need to assign to the corresponding environment variables.
4343

4444
There is also a small command line app which can be used for testing:
4545

deno.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@deno/gfm": "jsr:@deno/gfm@^0.8.0",
1616
"@kellnerd/musicbrainz": "jsr:@kellnerd/musicbrainz@^0.4.1",
1717
"@std/collections": "jsr:@std/collections@^1.0.10",
18+
"@std/dotenv": "jsr:@std/dotenv@^0.225.5",
1819
"@std/path": "jsr:@std/path@^1.0.8",
1920
"@std/testing": "jsr:@std/testing@^1.0.9",
2021
"@std/uuid": "jsr:@std/uuid@^1.0.6",

providers/Spotify/mod.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Automatically load .env environment variable file (before anything else).
2-
import 'std/dotenv/load.ts';
2+
import '@std/dotenv/load';
33

44
import type { ReleaseOptions } from '@/harmonizer/types.ts';
55
import { describeProvider, makeProviderOptions } from '@/providers/test_spec.ts';

providers/Tidal/mod.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Automatically load .env environment variable file (before anything else).
2-
import 'std/dotenv/load.ts';
2+
import '@std/dotenv/load';
33

44
import type { HarmonyRelease } from '@/harmonizer/types.ts';
55
import { describeProvider, makeProviderOptions } from '@/providers/test_spec.ts';

server/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env -S deno run -A --watch=static/,routes/
22

33
// Automatically load .env environment variable file (before anything else).
4-
import 'std/dotenv/load.ts';
4+
import '@std/dotenv/load';
55

66
import dev from 'fresh/dev.ts';
77

server/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Automatically load .env environment variable file and configure logger (before anything else).
2-
import 'std/dotenv/load.ts';
2+
import '@std/dotenv/load';
33
import './logging.ts';
44

55
import { shortRevision } from '@/config.ts';

0 commit comments

Comments
 (0)