Built with the Phoenix Framework
This is a fork of Chris McCord's Phoenix Chat Example
running on top of Elli Server through Pastelli
and
Pastelli.Phoenix
(README for more details).
use Mix.Config
# Configures the endpoint
# and the handler
config :chat, Chat.Endpoint,
url: [host: "localhost"],
handler: Pastelli.Phoenix,
# ...
defmodule Chat.Endpoint do
use Pastelli.Phoenix.Endpoint
use Phoenix.Endpoint, otp_app: :chat
plug Pastelli.Phoenix.SocketDispatchRouter
socket "/socket", Chat.UserSocket
if code_reloading? do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug Phoenix.CodeReloader
plug Phoenix.LiveReloader
end
...
plug Plug.Session,
store: :cookie,
key: "_chat_key",
signing_salt: "LH6XmqGb",
encryption_salt: "CIPZg4Qo"
plug Chat.Router
end