unityweb-server
A node web server for testing Unity WebGL projects.
Command Line
unityweb-server [SERVER_JSON]
With no SERVER_JSON, serve the current working directory through HTTP.
Otherwise, the JSON overrides the following default settings:
To enable HTTPS, you can set the https field like this:
Port is optional. If the private key is encrypted, a password will be requested.
Configuration
hostNames
string[]
Optional list of host names to log when the server starts.
http.port
number
HTTP port setting.
https.port
number
HTTPS port setting.
https.key
string
Path for a private key in PEM format. If encrypted, it will need a passphrase.
https.cert
string
Path for a certificate chain in PEM format.
rootPath
string
A root directory from where files are served.
serveStatic
serveStatic.ServeStaticOptions
Serves files from within a given root directory, using these options.
serveIndex
serveIndex.Options?
If set, serves directory listings pages for a given path, using these options.
htmlInternalError
string
HTML to serve when an internal server error happens.
License
BSD-3-Clause
© 2019 Alfish. All rights reserved.