Commit 1b82f9b4 authored by Aral Balkan's avatar Aral Balkan
Browse files

Update readme and developer documentation

parent 6c9fbd19
......@@ -8,16 +8,26 @@ At installation time, Auto Encrypt Localhost uses mkcert to create a local certi
At runtime, you can reach your server via the local loopback addresses (localhost, 127.0.0.1) on the device itself and also from other devices on the local area network by using your device’s external IPv4 address(es).
## System requirements
Tested and supported on:
- Linux (tested with elementary OS Hera)
- macOS (tested on Big Sur)
- Windows 10 (tested in Windows Terminal with PowerShell)
## Installation
```sh
npm i @small-tech/auto-encrypt-localhost
```
Note that during installation, Auto Encrypt Localhost will create your local certificate authority and install it in the system root store and generate locally-trusted certificates. These actions require elevated privileges (`sudo`). Since [npm does not handle sudo prompts correctly in lifecycle scripts](https://github.com/npm/cli/issues/2887), you will see a graphical sudo prompt pop up to ask you for your adminstrator password. Once you’ve provided it, installation will proceed as normal.
Note that during installation, Auto Encrypt Localhost will create your local certificate authority and install it in the system root store and generate locally-trusted certificates. These actions require elevated privileges. Since [npm does not handle sudo prompts correctly in lifecycle scripts](https://github.com/npm/cli/issues/2887), you will see a graphical sudo prompt pop up to ask you for your adminstrator password. Once you’ve provided it, installation will proceed as normal.
![Screenshot of graphical sudo prompt “Authentication required: Authentication is needed to run /bin/bash as the super user”](https://small-tech.org/images/graphical-sudo-prompt.png)
On Windows, you will also be prompted separately to allow the installation of the certificates.
## Usage
### Instructions
......
......@@ -4,187 +4,125 @@
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: dependency&#45;cruiser output Pages: 1 -->
<svg width="180pt" height="492pt"
viewBox="0.00 0.00 180.00 492.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 488)">
<svg width="180pt" height="342pt"
viewBox="0.00 0.00 180.00 342.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 338)">
<title>dependency&#45;cruiser output</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-488 176,-488 176,4 -4,4"/>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-338 176,-338 176,4 -4,4"/>
<g id="clust1" class="cluster">
<title>cluster_lib</title>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M77.5,-196C77.5,-196 148.5,-196 148.5,-196 154.5,-196 160.5,-202 160.5,-208 160.5,-208 160.5,-356 160.5,-356 160.5,-362 154.5,-368 148.5,-368 148.5,-368 77.5,-368 77.5,-368 71.5,-368 65.5,-362 65.5,-356 65.5,-356 65.5,-208 65.5,-208 65.5,-202 71.5,-196 77.5,-196"/>
<text text-anchor="middle" x="113" y="-356.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">lib</text>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M82.5,-196C82.5,-196 143.5,-196 143.5,-196 149.5,-196 155.5,-202 155.5,-208 155.5,-208 155.5,-236 155.5,-236 155.5,-242 149.5,-248 143.5,-248 143.5,-248 82.5,-248 82.5,-248 76.5,-248 70.5,-242 70.5,-236 70.5,-236 70.5,-208 70.5,-208 70.5,-202 76.5,-196 82.5,-196"/>
<text text-anchor="middle" x="113" y="-236.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">lib</text>
</g>
<g id="clust2" class="cluster">
<title>cluster_lib/util</title>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M90,-290C90,-290 136,-290 136,-290 142,-290 148,-296 148,-302 148,-302 148,-330 148,-330 148,-336 142,-342 136,-342 136,-342 90,-342 90,-342 84,-342 78,-336 78,-330 78,-330 78,-302 78,-302 78,-296 84,-290 90,-290"/>
<text text-anchor="middle" x="113" y="-330.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">util</text>
</g>
<g id="clust3" class="cluster">
<title>cluster_node_modules</title>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M74,-8C74,-8 152,-8 152,-8 158,-8 164,-14 164,-20 164,-20 164,-176 164,-176 164,-182 158,-188 152,-188 152,-188 74,-188 74,-188 68,-188 62,-182 62,-176 62,-176 62,-20 62,-20 62,-14 68,-8 74,-8"/>
<text text-anchor="middle" x="113" y="-176.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">node_modules</text>
</g>
<g id="clust4" class="cluster">
<g id="clust3" class="cluster">
<title>cluster_node_modules/fs&#45;extra</title>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M82,-76C82,-76 144,-76 144,-76 150,-76 156,-82 156,-88 156,-88 156,-150 156,-150 156,-156 150,-162 144,-162 144,-162 82,-162 82,-162 76,-162 70,-156 70,-150 70,-150 70,-88 70,-88 70,-82 76,-76 82,-76"/>
<text text-anchor="middle" x="113" y="-150.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">fs&#45;extra</text>
</g>
<g id="clust5" class="cluster">
<g id="clust4" class="cluster">
<title>cluster_node_modules/fs&#45;extra/lib</title>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M90,-84C90,-84 136,-84 136,-84 142,-84 148,-90 148,-96 148,-96 148,-124 148,-124 148,-130 142,-136 136,-136 136,-136 90,-136 90,-136 84,-136 78,-130 78,-124 78,-124 78,-96 78,-96 78,-90 84,-84 90,-84"/>
<text text-anchor="middle" x="113" y="-124.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">lib</text>
</g>
<g id="clust6" class="cluster">
<g id="clust5" class="cluster">
<title>cluster_node_modules/syswide&#45;cas</title>
<path fill="#ffffff" stroke="#000000" stroke-width="2" d="M90,-16C90,-16 137,-16 137,-16 143,-16 149,-22 149,-28 149,-28 149,-56 149,-56 149,-62 143,-68 137,-68 137,-68 90,-68 90,-68 84,-68 78,-62 78,-56 78,-56 78,-28 78,-28 78,-22 84,-16 90,-16"/>
<text text-anchor="middle" x="113.5" y="-56.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#000000">syswide&#45;cas</text>
</g>
<!-- child_process -->
<g id="node1" class="node">
<title>child_process</title>
<path fill="#ffffcc" stroke="#c0c0c0" d="M144,-484C144,-484 82,-484 82,-484 79,-484 76,-481 76,-478 76,-478 76,-472 76,-472 76,-469 79,-466 82,-466 82,-466 144,-466 144,-466 147,-466 150,-469 150,-472 150,-472 150,-478 150,-478 150,-481 147,-484 144,-484"/>
<text text-anchor="middle" x="113" y="-472.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">child_process</text>
</g>
<!-- https -->
<g id="node2" class="node">
<g id="node1" class="node">
<title>https</title>
<path fill="#ffffcc" stroke="#c0c0c0" d="M134,-454C134,-454 92,-454 92,-454 89,-454 86,-451 86,-448 86,-448 86,-442 86,-442 86,-439 89,-436 92,-436 92,-436 134,-436 134,-436 137,-436 140,-439 140,-442 140,-442 140,-448 140,-448 140,-451 137,-454 134,-454"/>
<text text-anchor="middle" x="113" y="-442.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">https</text>
<path fill="#ffffcc" stroke="#c0c0c0" d="M134,-334C134,-334 92,-334 92,-334 89,-334 86,-331 86,-328 86,-328 86,-322 86,-322 86,-319 89,-316 92,-316 92,-316 134,-316 134,-316 137,-316 140,-319 140,-322 140,-322 140,-328 140,-328 140,-331 137,-334 134,-334"/>
<text text-anchor="middle" x="113" y="-322.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">https</text>
</g>
<!-- index.js -->
<g id="node3" class="node">
<g id="node2" class="node">
<title>index.js</title>
<g id="a_node3"><a xlink:href="index.js" xlink:title="index.js">
<path fill="#ffffcc" stroke="#000000" d="M48,-299C48,-299 6,-299 6,-299 3,-299 0,-296 0,-293 0,-293 0,-287 0,-287 0,-284 3,-281 6,-281 6,-281 48,-281 48,-281 51,-281 54,-284 54,-287 54,-287 54,-293 54,-293 54,-296 51,-299 48,-299"/>
<text text-anchor="middle" x="27" y="-287.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">index.js</text>
<g id="a_node2"><a xlink:href="index.js" xlink:title="index.js">
<path fill="#ffffcc" stroke="#000000" d="M48,-248C48,-248 6,-248 6,-248 3,-248 0,-245 0,-242 0,-242 0,-236 0,-236 0,-233 3,-230 6,-230 6,-230 48,-230 48,-230 51,-230 54,-233 54,-236 54,-236 54,-242 54,-242 54,-245 51,-248 48,-248"/>
<text text-anchor="middle" x="27" y="-236.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">index.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;child_process -->
<g id="edge5" class="edge">
<title>index.js&#45;&gt;child_process</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M27.6824,-299.4003C30.1964,-331.4913 39.9628,-436.0533 62,-460 64.3827,-462.5891 67.1868,-464.7398 70.234,-466.5251"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="69.6349,-468.5723 75.9429,-469.36 71.5029,-464.8105 69.6349,-468.5723"/>
</g>
<!-- index.js&#45;&gt;https -->
<g id="edge7" class="edge">
<g id="edge3" class="edge">
<title>index.js&#45;&gt;https</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M28.1167,-299.2875C31.6761,-327.403 43.6111,-410.8398 62,-430 66.795,-434.9961 73.1602,-438.3521 79.7634,-440.6002"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="79.5086,-442.7129 85.8562,-442.3686 80.6794,-438.6793 79.5086,-442.7129"/>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M29.0322,-248.3314C32.8269,-263.5203 42.4401,-293.5441 62,-310 67.1367,-314.3215 73.4714,-317.3983 79.9088,-319.5887"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="79.4676,-321.6488 85.8181,-321.3614 80.6745,-317.6259 79.4676,-321.6488"/>
</g>
<!-- lib/HttpServer.js -->
<g id="node4" class="node">
<g id="node3" class="node">
<title>lib/HttpServer.js</title>
<g id="a_node4"><a xlink:href="lib/HttpServer.js" xlink:title="HttpServer.js">
<path fill="#ffffcc" stroke="#000000" d="M141.5,-282C141.5,-282 84.5,-282 84.5,-282 81.5,-282 78.5,-279 78.5,-276 78.5,-276 78.5,-270 78.5,-270 78.5,-267 81.5,-264 84.5,-264 84.5,-264 141.5,-264 141.5,-264 144.5,-264 147.5,-267 147.5,-270 147.5,-270 147.5,-276 147.5,-276 147.5,-279 144.5,-282 141.5,-282"/>
<text text-anchor="middle" x="113" y="-270.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">HttpServer.js</text>
<g id="a_node3"><a xlink:href="lib/HttpServer.js" xlink:title="HttpServer.js">
<path fill="#ffffcc" stroke="#000000" d="M141.5,-222C141.5,-222 84.5,-222 84.5,-222 81.5,-222 78.5,-219 78.5,-216 78.5,-216 78.5,-210 78.5,-210 78.5,-207 81.5,-204 84.5,-204 84.5,-204 141.5,-204 141.5,-204 144.5,-204 147.5,-207 147.5,-210 147.5,-210 147.5,-216 147.5,-216 147.5,-219 144.5,-222 141.5,-222"/>
<text text-anchor="middle" x="113" y="-210.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">HttpServer.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;lib/HttpServer.js -->
<g id="edge1" class="edge">
<title>index.js&#45;&gt;lib/HttpServer.js</title>
<path fill="none" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" d="M54.2109,-284.6211C59.9685,-283.483 66.1645,-282.2582 72.2981,-281.0457"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" points="72.9134,-283.0648 78.3923,-279.8411 72.0989,-278.9445 72.9134,-283.0648"/>
</g>
<!-- lib/installCertutil.js -->
<g id="node5" class="node">
<title>lib/installCertutil.js</title>
<g id="a_node5"><a xlink:href="lib/installCertutil.js" xlink:title="installCertutil.js">
<path fill="#ffffcc" stroke="#000000" d="M146.5,-252C146.5,-252 79.5,-252 79.5,-252 76.5,-252 73.5,-249 73.5,-246 73.5,-246 73.5,-240 73.5,-240 73.5,-237 76.5,-234 79.5,-234 79.5,-234 146.5,-234 146.5,-234 149.5,-234 152.5,-237 152.5,-240 152.5,-240 152.5,-246 152.5,-246 152.5,-249 149.5,-252 146.5,-252"/>
<text text-anchor="middle" x="113" y="-240.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">installCertutil.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;lib/installCertutil.js -->
<g id="edge2" class="edge">
<title>index.js&#45;&gt;lib/installCertutil.js</title>
<path fill="none" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" d="M34.7643,-280.9146C41.3459,-273.7445 51.3854,-263.9842 62,-258 64.3064,-256.6998 66.7362,-255.5026 69.233,-254.4016"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" points="70.3803,-256.2028 75.1535,-252.0044 68.804,-252.3098 70.3803,-256.2028"/>
</g>
<!-- lib/mkcert.js -->
<g id="node6" class="node">
<title>lib/mkcert.js</title>
<g id="a_node6"><a xlink:href="lib/mkcert.js" xlink:title="mkcert.js">
<path fill="#ffffcc" stroke="#000000" d="M134,-222C134,-222 92,-222 92,-222 89,-222 86,-219 86,-216 86,-216 86,-210 86,-210 86,-207 89,-204 92,-204 92,-204 134,-204 134,-204 137,-204 140,-207 140,-210 140,-210 140,-216 140,-216 140,-219 137,-222 134,-222"/>
<text text-anchor="middle" x="113" y="-210.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">mkcert.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;lib/mkcert.js -->
<g id="edge3" class="edge">
<title>index.js&#45;&gt;lib/mkcert.js</title>
<path fill="none" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" d="M29.6678,-280.9617C34.1276,-267.428 44.3874,-241.9957 62,-228 67.2002,-223.8677 73.5072,-220.8733 79.8878,-218.7037"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" points="80.6035,-220.6812 85.7385,-216.934 79.3875,-216.6611 80.6035,-220.6812"/>
</g>
<!-- lib/util/log.js -->
<g id="node7" class="node">
<title>lib/util/log.js</title>
<g id="a_node7"><a xlink:href="lib/util/log.js" xlink:title="log.js">
<path fill="#ffffcc" stroke="#000000" d="M134,-316C134,-316 92,-316 92,-316 89,-316 86,-313 86,-310 86,-310 86,-304 86,-304 86,-301 89,-298 92,-298 92,-298 134,-298 134,-298 137,-298 140,-301 140,-304 140,-304 140,-310 140,-310 140,-313 137,-316 134,-316"/>
<text text-anchor="middle" x="113" y="-304.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#000000">log.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;lib/util/log.js -->
<g id="edge4" class="edge">
<title>index.js&#45;&gt;lib/util/log.js</title>
<path fill="none" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" d="M54.2109,-295.3789C62.289,-296.9757 71.2304,-298.7432 79.6511,-300.4078"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" points="79.6727,-302.5526 85.9661,-301.6561 80.4872,-298.4323 79.6727,-302.5526"/>
<path fill="none" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" d="M54.2109,-230.7734C61.5047,-228.5683 69.5023,-226.1505 77.185,-223.8278"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-width="2" stroke-opacity="0.200000" points="77.8462,-225.8218 82.9818,-222.0753 76.6307,-221.8015 77.8462,-225.8218"/>
</g>
<!-- node_modules/fs&#45;extra/lib/index.js -->
<g id="node8" class="node">
<g id="node4" class="node">
<title>node_modules/fs&#45;extra/lib/index.js</title>
<g id="a_node8"><a xlink:href="node_modules/fs-extra/lib/index.js" xlink:title="index.js">
<g id="a_node4"><a xlink:href="node_modules/fs-extra/lib/index.js" xlink:title="index.js">
<path fill="#c40b0a" fill-opacity="0.101961" stroke="#000000" d="M134,-110C134,-110 92,-110 92,-110 89,-110 86,-107 86,-104 86,-104 86,-98 86,-98 86,-95 89,-92 92,-92 92,-92 134,-92 134,-92 137,-92 140,-95 140,-98 140,-98 140,-104 140,-104 140,-107 137,-110 134,-110"/>
<text text-anchor="middle" x="113" y="-98.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c40b0a">index.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;node_modules/fs&#45;extra/lib/index.js -->
<g id="edge6" class="edge">
<g id="edge2" class="edge">
<title>index.js&#45;&gt;node_modules/fs&#45;extra/lib/index.js</title>
<path fill="none" stroke="#000000" stroke-opacity="0.200000" d="M29.7203,-280.9839C35.0757,-263.6172 47.7144,-224.4614 62,-193 74.8208,-164.7644 93.0719,-133.5092 103.9086,-115.6629"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="105.9421,-116.3629 107.2809,-110.1485 102.359,-114.1716 105.9421,-116.3629"/>
<path fill="none" stroke="#000000" stroke-opacity="0.200000" d="M32.6427,-229.9454C47.2164,-206.5597 86.2125,-143.9845 103.9692,-115.4914"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="105.8326,-116.4717 107.2238,-110.2689 102.2681,-114.2503 105.8326,-116.4717"/>
</g>
<!-- os -->
<g id="node9" class="node">
<g id="node5" class="node">
<title>os</title>
<path fill="#ffffcc" stroke="#c0c0c0" d="M134,-424C134,-424 92,-424 92,-424 89,-424 86,-421 86,-418 86,-418 86,-412 86,-412 86,-409 89,-406 92,-406 92,-406 134,-406 134,-406 137,-406 140,-409 140,-412 140,-412 140,-418 140,-418 140,-421 137,-424 134,-424"/>
<text text-anchor="middle" x="113" y="-412.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">os</text>
<path fill="#ffffcc" stroke="#c0c0c0" d="M134,-304C134,-304 92,-304 92,-304 89,-304 86,-301 86,-298 86,-298 86,-292 86,-292 86,-289 89,-286 92,-286 92,-286 134,-286 134,-286 137,-286 140,-289 140,-292 140,-292 140,-298 140,-298 140,-301 137,-304 134,-304"/>
<text text-anchor="middle" x="113" y="-292.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">os</text>
</g>
<!-- index.js&#45;&gt;os -->
<g id="edge8" class="edge">
<g id="edge4" class="edge">
<title>index.js&#45;&gt;os</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M28.7952,-299.2975C33.5728,-323.1341 47.2443,-385.5655 62,-400 66.8996,-404.793 73.2485,-408.0674 79.7935,-410.3011"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="79.4747,-412.3961 85.8234,-412.0734 80.6591,-408.3666 79.4747,-412.3961"/>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M32.5454,-248.1885C38.6412,-257.5252 49.2776,-271.7532 62,-280 67.455,-283.536 73.7692,-286.2618 80.0567,-288.3554"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="79.4464,-290.3647 85.7981,-290.1056 80.6711,-286.3473 79.4464,-290.3647"/>
</g>
<!-- path -->
<g id="node10" class="node">
<g id="node6" class="node">
<title>path</title>
<path fill="#ffffcc" stroke="#c0c0c0" d="M134,-394C134,-394 92,-394 92,-394 89,-394 86,-391 86,-388 86,-388 86,-382 86,-382 86,-379 89,-376 92,-376 92,-376 134,-376 134,-376 137,-376 140,-379 140,-382 140,-382 140,-388 140,-388 140,-391 137,-394 134,-394"/>
<text text-anchor="middle" x="113" y="-382.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">path</text>
<path fill="#ffffcc" stroke="#c0c0c0" d="M134,-274C134,-274 92,-274 92,-274 89,-274 86,-271 86,-268 86,-268 86,-262 86,-262 86,-259 89,-256 92,-256 92,-256 134,-256 134,-256 137,-256 140,-259 140,-262 140,-262 140,-268 140,-268 140,-271 137,-274 134,-274"/>
<text text-anchor="middle" x="113" y="-262.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c0c0c0">path</text>
</g>
<!-- index.js&#45;&gt;path -->
<g id="edge9" class="edge">
<g id="edge5" class="edge">
<title>index.js&#45;&gt;path</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M31.6098,-299.2194C37.622,-310.7054 48.9282,-330.5746 62,-345 71.3942,-355.367 83.6927,-365.0989 93.8587,-372.3674"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="92.8342,-374.2136 98.9539,-375.9341 95.2428,-370.7728 92.8342,-374.2136"/>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" stroke-opacity="0.200000" d="M52.9347,-248.0932C55.9816,-249.1017 59.0536,-250.0915 62,-251 67.7909,-252.7856 73.9857,-254.5811 79.9912,-256.2626"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="79.5688,-258.3246 85.9117,-257.9016 80.6894,-254.2769 79.5688,-258.3246"/>
</g>
<!-- node_modules/syswide&#45;cas/index.js -->
<g id="node11" class="node">
<g id="node7" class="node">
<title>node_modules/syswide&#45;cas/index.js</title>
<g id="a_node11"><a xlink:href="node_modules/syswide-cas/index.js" xlink:title="index.js">
<g id="a_node7"><a xlink:href="node_modules/syswide-cas/index.js" xlink:title="index.js">
<path fill="#c40b0a" fill-opacity="0.101961" stroke="#000000" d="M134,-42C134,-42 92,-42 92,-42 89,-42 86,-39 86,-36 86,-36 86,-30 86,-30 86,-27 89,-24 92,-24 92,-24 134,-24 134,-24 137,-24 140,-27 140,-30 140,-30 140,-36 140,-36 140,-39 137,-42 134,-42"/>
<text text-anchor="middle" x="113" y="-30.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#c40b0a">index.js</text>
</a>
</g>
</g>
<!-- index.js&#45;&gt;node_modules/syswide&#45;cas/index.js -->
<g id="edge10" class="edge">
<g id="edge6" class="edge">
<title>index.js&#45;&gt;node_modules/syswide&#45;cas/index.js</title>
<path fill="none" stroke="#000000" stroke-opacity="0.200000" d="M27.7501,-280.8807C30.7869,-245.3901 42.9254,-116.6917 62,-81 69.5542,-66.8649 82.85,-54.5604 93.9721,-45.9489"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="95.3564,-47.5358 98.9009,-42.2587 92.8392,-44.1737 95.3564,-47.5358"/>
<path fill="none" stroke="#000000" stroke-opacity="0.200000" d="M28.3176,-229.7475C32.668,-199.9848 47.1451,-107.1355 62,-81 70.0238,-66.883 83.5551,-54.4322 94.6641,-45.7509"/>
<polygon fill="#000000" fill-opacity="0.200000" stroke="#000000" stroke-opacity="0.200000" points="96.0547,-47.3321 99.5693,-42.0351 93.5186,-43.9842 96.0547,-47.3321"/>
</g>
</g>
</svg>
......@@ -53,6 +53,12 @@ npm -s test
To see debug output, run `npm -s run test-debug` instead.
On Windows, run the following command instead:
```sh
npm -s run test-on-windows
```
## Coverage
```sh
......@@ -61,6 +67,12 @@ npm -s run coverage
To see debug output, run `npm -s run coverage-debug` instead.
On Windows, run the following command instead:
```sh
npm -s run coverage-on-windows
```
## Documentation
To regenerate the dependency diagram and this documentation:
......
......@@ -25,22 +25,24 @@ __Not shown (for clarity):__ third-party Node modules, the `util` namespace with
Generated using [dependency cruiser](https://github.com/sverweij/dependency-cruiser).
To run dependecy cruiser, you will need to [install Graphviz](https://graphviz.org/download/).
To run dependency cruiser, you will need to [install Graphviz](https://graphviz.org/download/).
## How it works in more detail
Auto Encrypt Localhost is a Node.js wrapper for [mkcert](https://github.com/FiloSottile/mkcert/) that:
Auto Encrypt Localhost is a Node.js wrapper for [mkcert](https://github.com/FiloSottile/mkcert/) that, at the npm post-install stage:
* Downloads and uses correct mkcert release binary for you machine on Linux, macOS, and Windows.
- Downloads and uses correct mkcert release binary for you machine on Linux, macOS, and Windows.
* Automatically installs the _certutil_ (nss) dependency on Linux on systems with apt, pacman, yum (untested) and and on macOS if you have [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/) (untested).
- Automatically installs the _certutil_ (nss) dependency on Linux on systems with apt, pacman, yum (untested) and and on macOS if you have [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/) (untested).
* Creates a root Certificate Authority.
- Creates a root Certificate Authority.
* Creates locally-trusted TLS certificates for localhost, 127.0.0.1, and ::1.
- Creates locally-trusted TLS certificates for localhost, 127.0.0.1, and ::1.
You can use these certificates for local development without triggering self-signed certificate errors.
At runtime, you can use the library to create your HTTPS servers instead of using the built-in Node.js `https` module.
For more details on how Auto Encrypt Localhost works behind the scenes, please [see the mkcert README](https://github.com/FiloSottile/mkcert/blob/master/README.md).
## Tests
......@@ -51,6 +53,12 @@ npm -s test
To see debug output, run `npm -s run test-debug` instead.
On Windows, run the following command instead:
```sh
npm -s run test-on-windows
```
## Coverage
```sh
......@@ -59,6 +67,12 @@ npm -s run coverage
To see debug output, run `npm -s run coverage-debug` instead.
On Windows, run the following command instead:
```sh
npm -s run coverage-on-windows
```
## Documentation
To regenerate the dependency diagram and this documentation:
......@@ -93,7 +107,7 @@ Use: AutoEncryptLocalhost.https.createServer(…)
#### module.exports.https
By aliasing the https property to the AutoEncryptLocalhost static class itself, we enable
people to add AutoEncryptLocalhost to their existing apps by requiring the module
people to add AutoEncryptLocalhost to their existing apps by importing the module
and prefixing their https.createServer(…) line with AutoEncryptLocalhost:
**Kind**: static property of [<code>module.exports</code>](#exp_module_@small-tech/auto-encrypt-localhost--module.exports)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment