-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28c490f
commit 4ccd1a2
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Getting started | ||
This is a quick starting guide to run the example. | ||
|
||
## Start the Server | ||
To start the example server you can run following command: | ||
|
||
```bash | ||
> cargo run --example server -- --listen=127.0.0.1:4433 | ||
``` | ||
|
||
This will start an the HTTP/3 server, listening to 127.0.0.1 on port 4433. | ||
This also generates a self-signed certificate for encryption. | ||
|
||
## Start the client | ||
To start the example client you can run following command: | ||
|
||
```bash | ||
> cargo run --example client -- https://localhost:4433 --insecure=true | ||
``` | ||
|
||
This sends an HTTP request to the server. | ||
The `--insecure=true` allows the client to accept invalid certificates like the self-signed, which the server has created. | ||
|
||
## Add some content to the Server | ||
So that the server responds something you can provide a directory with content files. | ||
|
||
```bash | ||
> cargo run --example server -- --listen=127.0.0.1:4433 --dir=content/root | ||
``` | ||
|
||
To start the client simply put the file name behind the URI: | ||
|
||
```bash | ||
> cargo run --example client -- https://localhost:4433/index.html --insecure=true | ||
``` |