https://github.com/vilfa/twebd
A simple multi-threaded web server written in Rust.
https://github.com/vilfa/twebd
http https multithreading rust tls web-server
Last synced: 8 months ago
JSON representation
A simple multi-threaded web server written in Rust.
- Host: GitHub
- URL: https://github.com/vilfa/twebd
- Owner: vilfa
- License: mit
- Created: 2021-09-17T16:42:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T20:40:31.000Z (almost 3 years ago)
- Last Synced: 2024-10-23T20:11:27.706Z (about 1 year ago)
- Topics: http, https, multithreading, rust, tls, web-server
- Language: Rust
- Homepage:
- Size: 262 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# twebd
Twebd is a **t**iny **web** **d**aemon with very simple multi-threading and support for both http and https.
This project was made for fun, its aim is to provide simple web server functionaility for personal projects.
## Installation
Clone the repo.
```bash
$ git clone https://github.com/vilfa/twebd
$ cd twebd
```
You can then install the package with cargo and run it as any other executable
```bash
$ cargo install --path .
$ twebd [FLAGS] [OPTIONS]
```
**OR**
just compile and run it directly.
```bash
$ cargo r -- [FLAGS] [OPTIONS]
```
## Usage/Examples
```
USAGE:
twebd.exe [FLAGS] [OPTIONS]
FLAGS:
-h, --help
Prints help information
-s, --https
Use https, requires a certificate and private key
-V, --version
Prints version information
OPTIONS:
-a, --address
Sets the server IP (v4/v6) address
-d, --directory
Sets the server root/public_html/wwwroot directory
-c, --https-cert
Path to the server certificate file
-k, --https-key
Path to the server private key file
-l, --loglevel
Sets the server logging verbosity [possible values: error, warn, info, debug, trace]
-p, --port
Sets the server port number [possible values: 1..65535]
-t, --threads
Sets the number of threads used by the server [possible values: 1..10]
```
## License
[MIT](https://github.com/vilfa/twebd/blob/master/LICENSE)