A simple node server for hosting Unity Web builds. Supports Gzip and Brotli.
- Clone or download this repository
- Install Node.js if you haven't already.
- Install dependencies:
npm install
Copy your WebGL build folders as subfolders of 'Builds'. Example folder structure:
project-root/
├── Builds/
│ ├── DungeonShuffle/
│ ├── RubyRanAwayFromHome/
│ ├── WebGLBuild_3_Final_NoEdit_LastEdition_ForReal_5/
│ └── ...
└── ...
Run the server with:
npm start
or if you have deno installed, you can use the deno version:
npm start-deno
The server will then start at http://localhost:8080
- Open the corresponding link with your browser. (preferably Chrome)
- You will see a list of your WebGL builds.
- Click on any build's name to run it
- If the build doesn't load, try forcing a hard refresh with Ctrl+Shift+R
You can modify the following settings in index.js
:
hostname
: The hostname to listen on ('localhost' by default)port
: The port to use (8080 by default)enableCORS
: Whether to enable Cross-Origin Resource SharingenableWasmMultithreading
: Whether to enable WebAssembly multithreading support