freertc 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,71 @@
1
+ // wrangler.template.jsonc — Copy to wrangler.jsonc and fill in your own values.
2
+ {
3
+ "name": "freertc",
4
+ // Default JS worker runtime (no Rust toolchain required).
5
+ "main": "src/index.js",
6
+ "compatibility_date": "2024-09-23",
7
+
8
+ // Serve static files from the public directory.
9
+ "assets": {
10
+ "directory": "public"
11
+ },
12
+
13
+ "vars": {
14
+ // Peer ID the relay server advertises as itself in PSP messages.
15
+ "RELAY_PEER_ID": "bootstrap-relay",
16
+
17
+ // Set automatically by the wizard from your domain (wss://<domain>/ws).
18
+ "RELAY_URL": "wss://YOUR_DOMAIN/ws",
19
+
20
+ // Set automatically by the wizard if you opt into the global network.
21
+ // Remove this line to run standalone (no cross-relay peer discovery).
22
+ "GLOBAL_RELAY_URL": "wss://peer.ooo/ws",
23
+ "RELAY_NAME": "Your App Relay"
24
+ },
25
+
26
+ // Cloudflare D1 SQLite database (free tier available).
27
+ // The wizard sets database_name to freertc-signal-<your-domain> automatically.
28
+ // To create manually: wrangler d1 create freertc-signal-your-domain
29
+ // Then paste the returned database_id below.
30
+ "d1_databases": [
31
+ {
32
+ "binding": "DB",
33
+ "database_name": "freertc-signal-YOUR_DOMAIN",
34
+ "database_id": "YOUR_D1_DATABASE_ID"
35
+ }
36
+ ],
37
+
38
+ // ── Custom domain (OPTIONAL) ──────────────────────────────────────────────
39
+ // If you have a domain on Cloudflare, uncomment and fill in:
40
+ //
41
+ // "routes": [
42
+ // {
43
+ // "pattern": "your-domain.example/*",
44
+ // "zone_name": "your-domain.example"
45
+ // }
46
+ // ]
47
+ //
48
+ // Without routes, Cloudflare assigns a free subdomain:
49
+ // https://freertc.<your-account>.workers.dev
50
+ // That URL works for WebSocket signaling too (wss://...).
51
+
52
+ // Optional: environment-specific overrides
53
+ "env": {
54
+ "production": {
55
+ "name": "freertc",
56
+ "vars": {
57
+ "RELAY_PEER_ID": "bootstrap-relay",
58
+ "RELAY_URL": "wss://YOUR_DOMAIN/ws",
59
+ "GLOBAL_RELAY_URL": "wss://peer.ooo/ws",
60
+ "RELAY_NAME": "Your App Relay"
61
+ },
62
+ "d1_databases": [
63
+ {
64
+ "binding": "DB",
65
+ "database_name": "freertc-signal-YOUR_DOMAIN",
66
+ "database_id": "YOUR_D1_DATABASE_ID"
67
+ }
68
+ ]
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "peer-ooo-worker-devtest",
3
+ "main": "src/index.js",
4
+ "compatibility_date": "2024-09-23",
5
+ "workers_dev": true,
6
+ "assets": {
7
+ "directory": "public"
8
+ },
9
+ "vars": {
10
+ "RELAY_PEER_ID": "bootstrap-relay"
11
+ },
12
+ "d1_databases": [
13
+ {
14
+ "binding": "DB",
15
+ "database_name": "freertc-signal",
16
+ "database_id": "52acefe2-e810-4b81-8225-1ca87d0205cc"
17
+ }
18
+ ]
19
+ }