/chat-socketio-rails

Simple chat using rails api, socketio and angular2

MIT LicenseMIT

My Simple Chat App

This app is intended to show a simple chat functionality using Socket.io in addition with Ruby on Rails and Angular2.

The structure of the project is very simple:

  • client-side: front-end side build in angular which allows users to interact with the application. Also communicate with socket-io-server to listen for incomming messages. All the information is send and request via a Rails API.
  • socket-io-server: listen and broadcast messages from Redis, a in-memory database which storage keys with an optional durability.
  • rails-api-server: back-end side build in rails which send and request data via an API. It communicates with Redis to storage new messages.

Because Rails is not an event-based server is not recommended to use it having real time applications. That's why Redis is so important, give you the communication between your data and the socket-io-server. This article explain with more details.

How to run the app locally

Make sure you have all the components up and running. Please go to the readme pages in every case.

Live example

https://gmunumel-chat-client-side.herokuapp.com/

License

Licensed under MIT