Skip to content

Commit

Permalink
feat: add the HonoJS example to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelmmiguel committed Oct 16, 2023
1 parent 066a8d3 commit 02b0437
Show file tree
Hide file tree
Showing 7 changed files with 1,935 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ examples/*.toml
.DS_Store
.wws
**/zig-cache
**/zig-out
**/zig-out
node_modules
6 changes: 5 additions & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COMPONENTS = components/rust-basic components/rust-kv

all: $(SUBDIRS) rust-params $(COMPONENTS) components/rust-params

.PHONY: $(SUBDIRS) rust-params $(COMPONENTS) components/rust-params
.PHONY: $(SUBDIRS) rust-params $(COMPONENTS) components/rust-params js-hono

$(SUBDIRS):
cd $@ && \
Expand All @@ -15,6 +15,10 @@ rust-params:
cargo build --target wasm32-wasi --release && \
cp target/wasm32-wasi/release/$@.wasm "./[id].wasm"

js-hono:
cd $@/src && \
npm install && npm run build

$(COMPONENTS):
mkdir -p $@
make $(@:components/%=%)
Expand Down
21 changes: 21 additions & 0 deletions examples/js-hono/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# JavaScript Hono example

Run a JavaScript application that uses the [HonoJS framework](https://hono.dev/) in Wasm Workers Server.

## Prerequisites

* Wasm Workers Server (wws):

```shell-session
curl -fsSL https://workers.wasmlabs.dev/install | bash
```

## Run

```shell-session
wws https://github.com/vmware-labs/wasm-workers-server.git -i --git-folder "examples/js-hono/dist"
```

## Resources

* [JavaScript documentation](https://workers.wasmlabs.dev/docs/languages/javascript)
Loading

0 comments on commit 02b0437

Please sign in to comment.