wasm-example

module
v0.0.0-...-ae86d3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT

README

Example wasm application

Written in golang. Routing with gin. Frontend wasm application. Websocket with gorilla.

The frontend contains a form, where a couple of parameter could be set. On case of form submission, the backend validates the data and executes a script on a remote machine. The validated data is used as the arguments of the executed script.

Docker system

  • Dockerfile for the site container

Build:

docker build -t wasm-example:latest -f Dockerfile .

Run:

docker run -p -e ASSETS_DIR=/app/assets 9090:9090 wasm-examle:latest
Docker compose
  • app contains the backend and frontend application
  • staging represents the staging remote machine
  • production represents the production remote machine.
  • db the storage for the application
docker compose up -d

When the go code changes the app image has to be recreated. It could be achived with adding the --build flag to the compose up command.

docker compose up -d --build

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL