ultraviolet/tomp
2022-02-23 16:44:05 -05:00
..
EncodeProtocol.mjs Release is almost here! 2022-02-22 23:31:05 -05:00
Example.mjs Release is almost here! 2022-02-22 23:31:05 -05:00
HeaderUtil.mjs Release is almost here! 2022-02-22 23:31:05 -05:00
LICENSE Release is almost here! 2022-02-22 23:31:05 -05:00
package-lock.json d 2022-02-23 16:44:05 -05:00
package.json Release is almost here! 2022-02-22 23:31:05 -05:00
README.md Release is almost here! 2022-02-22 23:31:05 -05:00
Response.mjs Release is almost here! 2022-02-22 23:31:05 -05:00
Server.mjs d 2022-02-23 16:44:05 -05:00
Standalone.mjs Release is almost here! 2022-02-22 23:31:05 -05:00
tomp.js Almost done! 2022-02-23 15:04:25 -05:00
V1.mjs d 2022-02-23 16:44:05 -05:00

TOMP Bare Server

This repository implements the TompHTTP bare server. See the specification here.

Usage

We provide a command-line interface for creating a server.

For more features, specify the --help option when running the CLI.

Quickstart

  1. Clone the repository locally
git clone https:/github.com/tomphttp/bare-server-node.git
  1. Enter the folder
cd bare-server-node
  1. Install dependencies
npm install
  1. Start the server
node ./Standalone.mjs --port 80 --host localhost

TLS

In the cloned repository (See quickstart)

  1. 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
  1. Start the server
node ./Standalone.mjs --port 443 --host localhost --tls --cert tls/cert.pem --key tls/key.pem