Relay is a middleware server built on top of Deno. The idea of Relay is to act like a relay server where any request sent to it will be forwarded to a different server that houses the concrete implementation.
This means that Relay can be used to encapsulate a network, thus meaning you do not need multiple machines to host multiple servers and or web applications.
Relay can:
- Encapsulate a network and only forward 1 server that talks to servers internally.
- Filter out incoming requests and decide what will be forwarded or not.
- Eliminate the need to buy multiple certificates.
- Serve websites and or web-apps.
- Organise HTTP requests in so called models.
- Decode incoming / outgoing requests.
- Reload the models without needing to restart the server
- Hide long URL names & params under a simple 2 sub route url.
- Manipulate incoming requests before forwarding (eg. append headers)
Please view the DOCS for more information
Install deno, clone, and run with:
deno run --allow-read --allow-net server.ts
-
-m ./path/to/models/folder
-
-v VERBOSITY(see below)
export enum Verbosity {
SILENT, // nothing is printed
LOW, // prints when a request is received and it's method
MEDIUM, // prints when a request is received, about to be sent, and some performance measuring (errors included)
HIGH, // prints everything... i feel bad for your terminal emulator ....
}
-
-p port_number
-
-c cert file -k key file
The above need to be used together for serving over TLS
Open up config.json.. write some stuff.. done