Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

a test to let angularjs working with rails live

Notifications You must be signed in to change notification settings

ranska/angular-rails-live-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

a test to let angularjs working with rails live

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published