This repository implements the TompHTTP bare server. See the specification here.
We provide a command-line interface for creating a server.
For more features, specify the --help
option when running the CLI.
- Clone the repository locally
git clone https:/github.com/tomphttp/bare-server-node.git
- Enter the folder
cd bare-server-node
- Install dependencies
npm install
- Start the server
node ./app.js server --port 80 --host localhost
In the cloned repository (See quickstart)
- Generate OpenSSL certificates (Unless you're bringing your own)
mkdir tls
openssl genrsa -out tls/key.pem
openssl req -new -key tls/key.pem -out tls/csr.pem
openssl x509 -req -days 9999 -in tls/csr.pem -signkey tls/key.pem -out tls/cert.pem
- Start the server
node ./app.js server --port 443 --host localhost --tls --cert tls/cert.pem --key tls/key.pem