File tree Expand file tree Collapse file tree 2 files changed +61
-5
lines changed Expand file tree Collapse file tree 2 files changed +61
-5
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,12 @@ managing many DNS records.
6
6
7
7
## Quickstart
8
8
9
- ``` console
10
- curl -LO https://github.com/prompt/handles-server/releases/download/v1/handles-server-linux
11
- chmod +x handles-server-linux
12
- DID_PROVIDER="memory" MEMORY_DOMAINS="example.com" MEMORY_DIDS="alice.example.com@did:plc:001" \
13
- ./handles-server-linux
9
+ ``` bash
10
+ sh -c " $( curl -Ls https://handles.run) "
14
11
```
15
12
13
+ ...or [ download the latest release] [ releases ] .
14
+
16
15
## Implementation
17
16
18
17
A ` handle ` is a hostname (e.g: ` alice.example.com ` ) which the server may or may
@@ -68,3 +67,4 @@ A string containing zero or more tokens which are replaced when rendering.
68
67
| ` {request.query} ` | Query included in the request | ` greeting=Hello+World ` ` ` |
69
68
70
69
[ atproto/resolution/well-known ] : https://atproto.com/specs/handle#handle-resolution
70
+ [ releases ] : https://github.com/prompt/handles-server/releases
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ os=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
4
+
5
+ case " $os " in
6
+ darwin* ) os=" macos" ;;
7
+ linux* ) os=" linux" ;;
8
+ * )
9
+ echo " Sorry, operating system ${os} not supported by this install script."
10
+ exit 1
11
+ ;;
12
+ esac
13
+
14
+ echo " Identified your operating system as ${os} "
15
+
16
+ file=" handles-server-${os} "
17
+
18
+ echo " Starting download of ${file} from github.com/prompt/handles-server"
19
+
20
+ curl -L --progress-bar --output handles-server https://github.com/prompt/handles-server/releases/download/v1/handles-server-${os}
21
+ chmod +x handles-server
22
+
23
+ echo " handles-server is downloaded and ready to run."
24
+
25
+ echo " Start demo of handles server using the in memory provider? (Y/n)"
26
+ read response
27
+ case " $response " in
28
+ [yY][eE][sS] | [yY] | " " )
29
+ function ended_demo() {
30
+ printf " \n\n"
31
+ echo " > hopefully the demo was helpful!"
32
+ printf " \n"
33
+ }
34
+
35
+ echo " > Starting server for domain example.com with handles alice.example.com and bob.example.com"
36
+ sleep 0.5 # An articial delay for time to read the message
37
+ echo " > Test it out with: curl --header 'Host: alice.example.com' http://localhost:8888/.well-known/atproto-did"
38
+ sleep 1 # An articial delay for time to read the message
39
+ echo " > exit with ctrl+c once you're done."
40
+ sleep 0.5
41
+ printf " \n\n"
42
+ trap ended_demo INT
43
+ (
44
+ set -x
45
+ GIN_MODE=release LOG_LEVEL=" debug" PORT=8888 DID_PROVIDER=" memory" MEMORY_DOMAINS=" example.com" MEMORY_DIDS=" alice.example.com@did:plc:001,bob.example.com@did:plc:002" ./handles-server
46
+ )
47
+ ;;
48
+ * )
49
+ echo " > No problem, no demo today :)"
50
+ sleep 1
51
+ ;;
52
+ esac
53
+
54
+ echo " > handles-server is downloaded and ready to run."
55
+ sleep 0.5
56
+ echo " > any questions? visit https://github.com/prompt/handles-server or email [email protected] :)"
You can’t perform that action at this time.
0 commit comments