Skip to content

jombie/cowboy-wss-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erlang Cowboy WSS example

I struggled for a while to get a working example with erlang and secure websockets. A lot had to do with not understanding the recommended erlang build chain. Here's a working example of WSS.

Steps

  1. git clone https://github.com/DanThiffault/cowboy-wss-example
  2. openssl req -x509 -newkey rsa:2048 -keyout priv/ssl/key.pem -out priv/ssl/cert.pem -days 365 -nodes
  3. make all
  4. make rel
  5. ./_rel/bin/websocket_example start
  6. visit http://localhost:8080 or https://localhost:8443

If you're using https, make sure to change the connection to wss://localhost:8443

Debugging

tail -F _rel/log/*

Useful links

Explanation

About

Example of cowboy secure web sockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.6%
  • Erlang 41.6%
  • Makefile 4.8%