https://github.com/launchscout/chat_room
Demo for the LiveState wordpress plugin article
https://github.com/launchscout/chat_room
Last synced: 7 months ago
JSON representation
Demo for the LiveState wordpress plugin article
- Host: GitHub
- URL: https://github.com/launchscout/chat_room
- Owner: launchscout
- Created: 2024-08-08T20:12:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-09T17:37:25.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T19:14:35.486Z (almost 2 years ago)
- Language: Elixir
- Size: 209 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChatRoom
This is the repo for the code for [Building an Elixir powered WordPress plugin with LiveState](https://launchscout.com/blog)
The back end is a normal Phoenix app with a LiveState channgel. Per usual:
* Run `mix setup` to install and setup dependencies
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
Now you can visit [`localhost:4000/chat_room`](http://localhost:4000/chat_room) to see the custom `` element in action outside of WordPress. If you hit it from two browsers, you can chat back and forth. Exciting!
## Building the WP block plugin
The source for the WordPress block plugin is in the `chat-room-plugin` directory. To build the plugin, run `build_plugin.sh`. This should give you a `chat-room-plugin.zip` file. In WP admin, you can go to plugins and upload this zip file. After that, you should see the Chat Room block appear as an option when you are in the Editor and add a block.