crystal-web-demo

Version, currently main branch1 version
  • main branchlatestJan 11, 2022

github.com/lbguilherme/crystal-web-demo

Demo for the crystal-web project

6 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  crystal-web-demo:
    github: lbguilherme/crystal-web-demo
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.2.2
License
MIT
Author
Guilherme Bernal <guilherme@cubos.io>
Target
  • crystal-web-demo from src/crystal-web-demo.cr

Dependencies

Runtime Dependencies

  • web*github: lbguilherme/crystal-web

README

# crystal-web-demo

This is a demo of the [crystal-web](https://github.com/lbguilherme/crystal-web) package.

## Usage

Build with:

```sh
shards install
lib/web/scripts/build.sh src/demo.cr
```

If you want to optimize for release mode use:

```sh
shards install
lib/web/scripts/build.sh src/demo.cr --release
```

Create an index.html file with:

```html
<script src="demo.js"></script>
<script>runCrystalApp("demo.wasm")</script>
```

And start any web server to serve those files:

```sh
python3 -mhttp.server
```