Skip to content

Commit

Permalink
Merge pull request #240 from Thiht/Thiht/issue27
Browse files Browse the repository at this point in the history
add doc to use HTTPS in dev
  • Loading branch information
Thiht authored Feb 7, 2022
2 parents 1b92e58 + 6855aa1 commit b39510a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The documentation is available on [smocker.dev](https://smocker.dev).
- [Documentation](#documentation)
- [Docker](#docker)
- [Caddy](#caddy)
- [HTTPS](#https)
- [Authors](#authors)
- [Contributors](#contributors)

Expand Down Expand Up @@ -182,6 +183,24 @@ If you need to test Smocker with a base path, you can use the Caddyfile provided
- `make start-release`, `make VERSION=xxx start-release`: create a released version of Smocker and launch it with `/smocker/` as base path
- `make start-caddy`: start Caddy to make Smocker accessible at http://localhost:8082/smocker/

### HTTPS

If you need to test Smocker with HTTPS enabled, the easiest way is to generate a locally signed certificate with [mkcert](https://github.com/FiloSottile/mkcert):

```sh
# Install the local certificate authority
mkcert -install

# Create a certificate for localhost
mkcert -cert-file /tmp/cert.pem -key-file /tmp/key.pem localhost
```

Then, start Smocker with TLS enabled, using your generated certificate:

```sh
./smocker -mock-server-listen-port=44300 -config-listen-port=44301 -tls-enable -tls-cert-file=/tmp/cert.pem -tls-private-key-file=/tmp/key.pm
```

## Authors

- [Thibaut Rousseau](https://github.com/Thiht)
Expand Down

0 comments on commit b39510a

Please sign in to comment.