Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/frozenbonito/unisrv

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/frozenbonito/unisrv

  • v0.3.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

unisrv (Unity Server for WebGL)

Go Reference CI License Release

unisrv is a preview server for Unity WebGL applications.

Notice: This project is focused on local preview only. Not recommended for production use.

Usage

CLI

Installation

Download the binary from the releases.

Running

To start the server, execute the following in your WebGL build location:

unisrv

Or specify the build location expressly:

unisrv ./Build/
Configurations

The server is configurable via the following options or environment variables.

OptionEnvironment VariableDefault ValueDescription
-baseUNISRV_BASEThe base path for Unity application.
-disable-no-cacheUNISRV_DISABLE_NO_CACHEfalseDisable setting Cache-Control: no-cache header.
-hostUNISRV_HOSTlocalhostThe hostname to listen on.
-portUNISRV_PORT5000The port number to listen on.
-read-timeoutUNISRV_READ_TIMEOUT5The maximum duration for reading request.
-write-timeoutUNISRV_WRITE_TIMEOUT5The maximum duration for writing response.

Docker image

Docker images are also available.

docker run --rm -v $(pwd):/app -p 5000:5000 frozenbonito/unisrv

Mount your Unity application to /app directory in the container.

Library

It can also be used as a library for Go.

For example:

package main

import (
	"net/http"

	"github.com/frozenbonito/unisrv"
	"github.com/go-chi/chi/v5"
	"github.com/go-chi/chi/v5/middleware"
)

func main() {
	r := chi.NewRouter()
	r.Use(middleware.Logger)
	r.Mount("/", unisrv.NewHandler("/path/to/unity-build-location", nil))
	http.ListenAndServe(":8080", r)
}

See go.dev for more details.

Unity Preview Server - Unity editor extension powered by unisrv.

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc