A simple server for Unity WebGL games that supports different compression mechanisms.
npm install serve-unityA lightweight Node.js server designed to serve Unity WebGL builds with proper compression headers for Gzip and Brotli.
- Supports serving Unity WebGL builds with Gzip and Brotli compression.
- Correctly handles Content-Type and Content-Encoding headers for Unity files (e.g., .wasm, .js, .data).
- Automatically decodes URL-encoded paths (e.g., files with spaces in names).
- Easy to use and install globally.
To install serve-unity globally via npm:
``bash`
npm install -g serve-unity
Run the server in the directory containing your Unity WebGL build:
```
serve-unity
Open your browser and go to: http://localhost:9000 (if you set the port to 9000)
If you don’t specify a port, the server defaults to 9000
This project is licensed under the MIT License.
Contributions are welcome! Feel free to open an issue or submit a pull request.
Got a cool game to upload? https://simmer.io/upload
Enjoy fast and simple Unity WebGL serving with serve-unity! 🎮