Skip to content

Commit ff24ac5

Browse files
docs: updated README.md
1 parent 234ca8e commit ff24ac5

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,37 @@ To build this site:
3939

4040
### Generate a self-signed certificate
4141

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.
4343

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
4548

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
5150

52-
# at this point, open any https website in Firefox before running the below commands
51+
mkcert -install
52+
mkcert -key-file localhost_key.pem -cert-file localhost_cert.pem localhost 127.0.0.1
53+
cat localhost_cert.pem > localhost_fullchain.pem
54+
cat "$(mkcert -CAROOT)/rootCA.pem" >> localhost_fullchain.pem
55+
```
56+
57+
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.
5358

54-
mkcert -install
55-
mkcert -key-file localhost_key.pem -cert-file localhost_cert.pem localhost 127.0.0.1
56-
cat localhost_cert.pem > localhost_fullchain.pem
57-
cat "$(mkcert -CAROOT)/rootCA.pem" >> localhost_fullchain.pem
58-
```
59-
- 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
6060

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`).
61+
```bash
62+
cp -v ~/.ssh/localhost_cert.pem ~/.ssh/localhost_key.pem .
63+
```
6264

6365
### Environment variables
6466

6567
Add the following `.env` file to the repo root
6668

6769
```ini
68-
NODE_ENV=stable
70+
NODE_ENV=development
6971
SERVER_ENV=development
70-
AIRTABLE_SINGULARITY_ACCESS_TOKEN=<entry>
71-
72+
AIRTABLE_SINGULARITY_ACCESS_TOKEN=<temp>
7273
```
7374

7475
## Updating dependencies

0 commit comments

Comments
 (0)