README.md 1.66 KB
Newer Older
Aral Balkan's avatar
Aral Balkan committed
1 2 3 4 5 6
# https-server

An HTTPS server that uses [nodecert](https://source.ind.ie/hypha/tools/nodecert).

## Design goals

7
  * ✔ Command-line app
8 9
  * To-do: Easy integration into Express
  * To-do: Seamless switch to using ACME/Let’s Encrypt in production
Aral Balkan's avatar
Aral Balkan committed
10 11 12 13 14 15 16 17 18 19

## Installation

```sh
npm i -g @ind.ie/https-server
```

## Usage

### Commandline
Aral Balkan's avatar
Aral Balkan committed
20

Aral Balkan's avatar
Aral Balkan committed
21
```sh
22
https-server [folder-to-serve] [port]
Aral Balkan's avatar
Aral Balkan committed
23
```
24 25 26 27

Both arguments are optional. Currently, if you want to specify the port manually, you must also specify the folder-to-serve.

  * `[folder-to-serve]` defaults to `.` (the current directory)
28
  * `[port]` defaults to 443 (automatically privileges Node.js to bind to it on Linux. This is not an issue on macOS & Windows.)
Aral Balkan's avatar
Aral Balkan committed
29

30
If you do not already have TLS certificates, they will be created for you automatically using [nodecert](https://source.ind.ie/hypha/tools/nodecert).
31

32
All dependencies will be installed automatically for you if they do not exist if you have apt, pacman, or yum (untested) on Linux or if you have [Homebrew](https://brew.sh/) or [MacPorts](https://www.macports.org/) (untested) on macOS.
33 34 35 36 37 38 39

## Help wanted

I’ve currently only tested this on Pop!_OS 18.10 (Ubuntu-based distro). I can use your help to test this on other platforms:

  * Windows 64-bit (should work without requiring any dependencies)
  * Linux with yum
40
  * macOS with MacPorts
41 42

If you get a chance to try out https-server on the above platforms, please [let me know how/if it works](https://github.com/indie-mirror/https-server/issues). Thank you.
43 44 45 46

## Thanks

  * [thagoat](https://github.com/thagoat) for confirming that [installation works on Arch Linux with Pacman](https://github.com/indie-mirror/https-server/issues/1).