ranch-talk/readme.md

47 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-02-11 09:42:24 -06:00
# ranch-talk
2022-02-11 12:05:42 -06:00
2022-02-15 10:09:34 -06:00
[🖥️ Upstream][upstream] • [🐙 GitHub Mirror][github]
2022-02-11 12:05:42 -06:00
I was asked to give a 5-15 minute talk on [Ranch][ranch], a TCP socket acceptor
2022-02-15 10:11:25 -06:00
pool writter in Erlang, to show how OTP constructs are used in the real world
and expose some of [Elixir's Phoenix's][phoenix] underpinnings. This
[Livebook][livebook] contains my code and notes for that talk.
2022-02-11 12:05:42 -06:00
Thanks to [Divvy][divvy] for inviting me to give this talk.
# Usage
```bash
2022-02-11 15:45:13 -06:00
asdf install
2022-02-11 12:05:42 -06:00
mix escript.install github livebook-dev/livebook
git clone https://git.lyte.dev/lytedev/ranch-talk.git
2022-02-11 15:45:13 -06:00
cd ranch-talk
2022-02-11 14:09:56 -06:00
mix do deps.get, compile
2022-03-02 10:24:47 -06:00
```
Install and run a local Livebook in `attached` mode and automatically grab my
code:
```fish
2022-05-25 09:37:48 -05:00
env LIVEBOOK_PORT=5560 LIVEBOOK_IFRAME_PORT=5561 \
2022-03-02 10:24:47 -06:00
LIVEBOOK_HOME=(pwd) LIVEBOOK_IP=0.0.0.0 \
livebook server --default-runtime mix --no-token
```
Or if you're gonna share this with everybody, it's probably safer to run it
inside of Docker:
```bash
docker build . --tag ranch-talk
docker run -it --rm -p 5588:5588 -p 5589:5589 ranch-talk
2022-02-11 12:05:42 -06:00
```
Enjoy!
[ranch]: https://github.com/ninenines/ranch
[phoenix]: https://www.phoenixframework.org/
[livebook]: https://github.com/livebook-dev/livebook
[divvy]: https://getdivvy.com/
2022-02-15 10:09:34 -06:00
[upstream]: https://git.lyte.dev/lytedev/ranch-talk
[github]: https://github.com/lytedev/ranch-talk