Skip to content

Commit

Permalink
adding a quickstart guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2424 authored and seanmonstar committed Feb 10, 2022
1 parent 28c490f commit 4ccd1a2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions examples/readme.md
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
```

0 comments on commit 4ccd1a2

Please sign in to comment.