Git Product home page Git Product logo

chat_web's Introduction

Extended Erlang Examples - A Webchat

This webchat is designed to be a hackable and rewarding example of how to structure and work on Erlang/OTP applications. The end result will be a project that is interesting to explore, demonstrates The Right Way(tm), and has bugs to fix and features to add that help ease beginners into working on complete Erlang systems.

Running

In addition to Erlang 18, building this project requires git to be in your PATH and either GNU make or rebar and relx. By default, the application runs on port 8080. Change src/chat_web_app.erl if a different port is desired.

To build and start with make, run make run. To build and start with rebar, run rebar get-deps; rebar compile; relx -c relx.config; ./_rel/chat_web/bin/chat_web console.

After starting the release, point your favorite browser that supports WebSockets (tested with Firefox and Chrome) at http://localhost:8080/ and choose nickname and password (subsequent connections to use that nickname will require the same password).

The available commands are:

/join <room> Join a room. You can be in multiple rooms at once, but your messages will only be sent to the most recently joined room. You can /join a room more than once to select it as the active room.

/part [<room>] Depart from a room. Defaults to the most recently joined room, in which case the previously active room is moved back into the foreground.

Anything other than these commands will be sent to most recently joined room.

TODO

  • Add tests with gun or possibly PhantomJS
  • Write a guide explaining the structure and rationale behind this application and its dependencies.
  • Write an introduction into debugging this application using observer and process tracing.
  • Write assignments for extending functionality.

chat_web's People

Contributors

acammack avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.