You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,36 +39,37 @@ To build this site:
39
39
40
40
### Generate a self-signed certificate
41
41
42
-
In order to browse with TLS locally, you'll need a certificate. A self-signed certificate is satisfactory for this purpose. Here's how to set one up.
42
+
In order to run this repo in local development mode, two files must be added to the repo's root directory. The following set of commands apply to a macOS system. However, if mkcert is installed by another package manager, this can be run on any flavor of *nix.
43
43
44
-
Used for development in a local environment (such as on your personal computer). You only need to do this once. If you've already done this for a different project, just copy your existing `localhost_cert.pem` and `localhost_key.pem` files from `~/.ssh` into the root directory of this repo and skip the rest of this step.
44
+
```bash
45
+
cd~/.ssh
46
+
brew install mkcert # replace with another package manager for linux distro
47
+
brew install nss # need to install certutil before running `mkcert -install` so the CA can be automatically installed in Firefox
45
48
46
-
-[Install mkcert and generate certificate](https://github.com/FiloSottile/mkcert) by running the commands below, in this order:
47
-
```zsh
48
-
cd~/.ssh
49
-
brew install mkcert # replace with another package manager for linux distro
50
-
brew install nss # need to install certutil before running `mkcert -install` so the CA can be automatically installed in Firefox
49
+
# at this point, open any https website in Firefox before running the below commands
51
50
52
-
# at this point, open any https website in Firefox before running the below commands
Now, navigate to your project directory, wherever the repo was cloned to, for example cd `~/Sites/work/website` and copy the `.pem` files into the repo root. These keys are .gitignored by default.
- Copy the new `localhost_cert.pem` and `localhost_key.pem` files to the root directory of this repo
59
+
Or run the below command to copy the files to your currently `cd`’d dir automatically
60
60
61
-
The above tutorial is specifically for MacOS machines with `brew` installed. For other \*nix OS's replace the installation step with your preferred package manager (e.g. `apt install mkcert`).
0 commit comments