Open Collective
Open Collective
Loading
V6.2.0
Published on March 19, 2020 by Maxence Charriere

Hello there, this is Maxence.

I'm glad to release the v6.2.0 of the go-app package.

Customizable root directory

Previously, the app.wasm file and the web directory had to be located in the same directory as the server binary in order to be served.

This version allows changing this behavior by introducing the root directory.

The root directory is where app.wasm and the web directory are located:


CUSTOM_LOCATION

├── app.wasm

└── web

└── Static resources...


By default located in the same directory as the server binary, it can be changed to:

  • Another local location.
  • A cloud storage bucket such as Amazon S3 or Google Cloud Storage, which is very useful in a scenario where a PWA is deployed on a cloud function to reduce function counter.


h := app.Handler{

RootDir: "CUSTOM_LOCATION",

}


syscall/js wrapper

Wrappers for CopyBytesToGo and CopyBytesToJS have been added.

Misc

Some refactoring to improve overall code quality.