Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benjamin-thomas/hot_elm
Rails integration with Elm + Hotwire + Stimulus demo
https://github.com/benjamin-thomas/hot_elm
Last synced: about 1 month ago
JSON representation
Rails integration with Elm + Hotwire + Stimulus demo
- Host: GitHub
- URL: https://github.com/benjamin-thomas/hot_elm
- Owner: benjamin-thomas
- Created: 2022-08-06T14:16:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-15T12:02:13.000Z (over 2 years ago)
- Last Synced: 2024-08-01T13:35:20.394Z (4 months ago)
- Language: Ruby
- Size: 62.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ccamel - benjamin-thomas/hot_elm - Rails integration with Elm + Hotwire + Stimulus demo (Ruby)
README
# Elm + Hotwire + Stimulus demo
This is a rails app.
## Run locally
Requirements:
- docker-compose
- yarn
- browser-sync (optional, see `Procfile.dev`)
- local ruby install (see: `.ruby-version` file)
- see [rbenv](https://github.com/rbenv/rbenv) for easy ruby version management### Step 1: add a local hostname entry to /etc/hosts
```bash
root@me:~# cat /etc/hosts | grep hot-elm
127.19.0.1 pg.hot-elm.test
```### Step 2: adjust the `docker-compose.yml` ports config
As per the /etc/hosts entry
### Step 3: launch the dev database
```bash
docker-compose up pg
```### Step 4: launch the rails app
```bash
./bin/dev
```### Step 5: Open your browser
See `Procfile.dev` to change the listening ports, etc.
One port is dedicated to a live reload environment.
The other is the standard rails port, which may be better suited when receiving and sending data via websockets (turbo frames)