Sha256: 4424b8da75dfb17a1ddb9da7ec216bba18a01f9c4941d070593b3e596c8654d5

Contents?: true

Size: 1.05 KB

Versions: 7

Compression:

Stored size: 1.05 KB

Contents

# PWA app to run a Rails Wasm app

The app provides a Service Worker to serve requests through the Rails/Wasm app.

## Running locallly

```sh
yarn install

yarn dev
```

Then go to [http://localhost:5173](http://localhost:5173).

> [!NOTE]
> Use Chrome or another browser supporting [CookieStore API](https://caniuse.com/?search=cookiestore).

## Serving via HTTPS

Although `localhost` should work fine for development, you can also run the app over `https://` for a more production-like experience (and to attach a worker to a custom domain).

For that, we recommend using [puma-dev](https://github.com/puma/puma-dev).

Install `puma-dev` and add the port 5173 to its configuration:

```sh
echo "5173" > ~/.puma-dev/rails-wasm
```

Then, run the server as follows:

```sh
yarn dev --host 0.0.0.0
```

Go to [https://rails-wasm.test](https://rails-wasm.test) to open the app.

## Credits

The launcher HTML/JS is based on the [Yuta Saito](https://github.com/kateinoigakukun)'s work on [Mastodon in the browser](https://github.com/kateinoigakukun/mastodon/tree/katei/wasmify).

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wasmify-rails-0.2.0 lib/generators/wasmify/pwa/templates/pwa/README.md
wasmify-rails-0.1.5 lib/generators/wasmify/pwa/templates/pwa/README.md
wasmify-rails-0.1.4 lib/generators/wasmify/pwa/templates/pwa/README.md
wasmify-rails-0.1.3 lib/generators/wasmify/pwa/templates/pwa/README.md
wasmify-rails-0.1.2 lib/generators/wasmify/pwa/templates/pwa/README.md
wasmify-rails-0.1.1 lib/generators/wasmify/pwa/templates/pwa/README.md
wasmify-rails-0.1.0 lib/generators/wasmify/pwa/templates/pwa/README.md