Current section
Files
Jump to
Current section
Files
assets/src/socket.js
// NOTE: The contents of this file will only be executed if
// you uncomment its entry in "assets/js/app.js".
// To use Phoenix channels, the first step is to import Socket
// and connect at the socket path in "lib/my_app/endpoint.ex":
import {Socket} from 'phoenix'
let socket = new Socket('/socket', {params: {}})
socket.connect()
export default socket