logo
  • Start here
  • Episodes
  • Articles
  • Log in
  • Sign up

Phoenix 1.4 Chat Server: Part 5

Topics:
ChitChat
Channels
Sockets
EEx
Phoenix

This episode is part 5 in a Phoenix 1.4 Chat Server series:

  • Series Overview
  • Part 1
  • Part 2
  • Part 3
  • Part 4
  • Part 5 (this page)
  • Part 6
  • Part 7
  • Part 8
  • Part 9

In this episode we build out the chat page, and set up Phoenix Channels along with the JavaScript to connect to them. Here's the plan:

  • Create the eex template for the chatrooms
  • Set up the UserSocket and RoomChannel on the back-end.
  • Write the JavaScript for the chat room to connect to the socket and join the appropriate channel.
  • Display chats on the front-end.

At the end of this episode, we have an anonymous chat set up for each room created.

(Source code available for premium members)

Share

Request a free email course
Back to index

No Comments

Log in to leave a comment
Alchemist Camp 2017-2020
Hosted on Digital Ocean
Terms and Conditions