File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Getting started
2+ This is a quick starting guide to run the example.
3+
4+ ## Start the Server
5+ To start the example server you can run following command:
6+
7+ ``` bash
8+ > cargo run --example server -- --listen=127.0.0.1:4433
9+ ```
10+
11+ This will start an the HTTP/3 server, listening to 127.0.0.1 on port 4433.
12+ This also generates a self-signed certificate for encryption.
13+
14+ ## Start the client
15+ To start the example client you can run following command:
16+
17+ ``` bash
18+ > cargo run --example client -- https://localhost:4433 --insecure=true
19+ ```
20+
21+ This sends an HTTP request to the server.
22+ The ` --insecure=true ` allows the client to accept invalid certificates like the self-signed, which the server has created.
23+
24+ ## Add some content to the Server
25+ So that the server responds something you can provide a directory with content files.
26+
27+ ``` bash
28+ > cargo run --example server -- --listen=127.0.0.1:4433 --dir=content/root
29+ ```
30+
31+ To start the client simply put the file name behind the URI:
32+
33+ ``` bash
34+ > cargo run --example client -- https://localhost:4433/index.html --insecure=true
35+ ```
You can’t perform that action at this time.
0 commit comments