Coder Social home page Coder Social logo

fgc29 / angular-rails-live-chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ranska/angular-rails-live-chat

0.0 2.0 0.0 1.07 MB

a test to let angularjs working with rails live

Ruby 67.99% JavaScript 5.35% CoffeeScript 1.22% CSS 5.94% HTML 19.50%

angular-rails-live-chat's Introduction

A simple realtime chat using Rails and Angularjs

Requirement

  • Thin/Puma servers or similar
  • Chrome or Firefox or something else that support SSE natively. However, it looks like some adblocks make SSE connection stalling in "pending" status.

Some tricks and pitfalls in ActionController::live

During the development, I noticed some common pitfalls in ActionController::live, I call them ๅ‘ (pronounced as "/kng/")

  • During development, you have to use either Thin or Puma as server. There might be others but I did not test. WEBrick shipped by default would not work because it's not threaded server.
  • Make sure you have config.allow_concurrency = true in environments/development.rb. This will remove several Rails global locks that stops requests from being processed.
  • It's quite interesting that alto ugh AngularJS is using existing jQuery library rather than using its own mocking library, it still requires manual settings for CSRF-Token.

I believe all the three issues will be fixed in Rails soon.

angular-rails-live-chat's People

Contributors

qsun avatar

Watchers

James Cloos avatar Francis Castillo 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.