venusia

command module
v0.0.0-...-ff2e64a Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 9 Imported by: 0

README

Venusia

Venusia is a small https wasm module registry

Upload wasm file

curl -v \
  -F "file=@oh.wasm" \
	-H "Content-Type: multipart/form-data" \
	-X POST https://localhost:9999/wasm/upload

Delete wasm file

curl -v \
	-X DELETE https://localhost:9999/wasm/delete/oh.wasm

Download wasm file

curl https://localhost:9999/wasm/download/oh.wasm --output oh.wasm

Build Venusia

go build

Create a Runnable

cd samples
subo create runnable hello --lang tinygo
subo build hello/
# it will generate a hello.wasm file

Launch Venusia

REGISTRY_CRT="certs/venusia.local.crt" \
REGISTRY_KEY="certs/venusia.local.key" \
REGISTRY_HTTP=7070 \
./venusia
Publish a wasm file to Venusia
curl -v \
  -F "file=@samples/hello/hello.wasm" \
	-H "Content-Type: multipart/form-data" \
	-X POST https://localhost:7070/wasm/upload

it will upload the file to the functions directory

Serve hello.wasm with Sat
SAT_HTTP_PORT=8080 ./sat/.bin/sat https://localhost:7070/wasm/download/hello.wasm

curl localhost:8080 -d 'Bob Morane'

Generate self-signed certificates

sudo apt-get update
sudo apt install libnss3-tools -y
brew install mkcert

If you use Gitpod to open this project you don't need to install anything

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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