Crates.io | lwa_simple_server |
lib.rs | lwa_simple_server |
version | 0.1.0 |
source | src |
created_at | 2023-08-29 18:50:13.17412 |
updated_at | 2023-08-29 18:50:13.17412 |
description | Simple server made with hosting locally webgl games in mind. |
homepage | https://github.com/Leinnan/lwa_simple_server |
repository | https://github.com/Leinnan/lwa_simple_server |
max_upload_size | |
id | 958366 |
size | 49,905 |
Simple server made with hosting locally webgl games in mind
Usage: lwa_simple_server [OPTIONS] [FOLDER_TO_HOST]
Arguments:
[FOLDER_TO_HOST] Folder to host, current by default
Options:
--ssl
Should use SSL, false by default
-p, --port <PORT>
Specifies hosting port, "8080" by default
-c, --certificates-folder <CERTIFICATES_FOLDER>
Specifies folder containing "key.pem" and "cert.pem" required for ssl hosting, defaults to current folder
-h, --help
Print help
-V, --version
Print version
It makes testing Unity webgl games easy, even allows connecting with different domains(less CORS issues during tests).
ACHTUNG!
WARNING!
It is NOT meant to use in production environment
For now it is required to have cargo and rust installed:
cargo install lwa_simple_server
To start run it in folder that should be root folder of hosted site:
cd desired/folder
lwa_simple_server "folder_to_host/current_by_default"
If you would like to use OpenSSL create key with command below and pass paths to generated files as arguments in command in order to use it:
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 -subj '/CN=localhost'