Functional Web Development with Elixir, OTP, and Phoenix (Pragprog)

Just a little hack in case You cannot use require in the browser… You can add in app.js

window.phoenix = require("phoenix");

This will give You access to phoenix in the console through window object, like this

> var socket = new window.phoenix.Socket("/socket", {})
5 Likes