Skip to content

Instantly share code, notes, and snippets.

@alanpeabody
alanpeabody / my_app.ex
Last active Jan 31, 2022
Websockets in Elixir with Cowboy and Plug
View my_app.ex
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
])