Simple server made with hosting locally webgl games in mind
Go to file
Piotr Siuszko fac40797b7 Folder to host as optional argument 2023-08-29 20:17:01 +02:00
.github/workflows Rework 2023-08-29 19:54:32 +02:00
src Folder to host as optional argument 2023-08-29 20:17:01 +02:00
.gitignore First commit 2021-04-21 18:26:12 +02:00
Cargo.lock Rework 2023-08-29 19:54:32 +02:00
Cargo.toml Rework 2023-08-29 19:54:32 +02:00
LICENSE.md Create Licence 2021-04-21 22:15:23 +02:00
README.md Folder to host as optional argument 2023-08-29 20:17:01 +02:00

README.md

lwa_simple_server

build

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
  -a, --address <ADDRESS>
          Specifies hosting address, "localhost:8080" by default
  -c, --certificates-folder <CERTIFICATES_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

Installation

For now it is required to have cargo and rust installed:

git clone https://github.com/Leinnan/lwa_simple_server.git
cd lwa_simple_server
cargo install --path .

Usage

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"

SSL

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'