{"id":28585977,"url":"https://github.com/phusion/passenger-ruby-faye-websocket-demo","last_synced_at":"2025-07-04T18:32:22.451Z","repository":{"id":17487630,"uuid":"20270915","full_name":"phusion/passenger-ruby-faye-websocket-demo","owner":"phusion","description":"Demonstrates WebSockets on Phusion Passenger through the faye-websocket gem","archived":false,"fork":false,"pushed_at":"2015-12-07T18:48:30.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-04-09T13:16:09.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phusion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-28T20:14:54.000Z","updated_at":"2018-05-08T15:55:53.000Z","dependencies_parsed_at":"2022-08-04T19:16:05.327Z","dependency_job_id":null,"html_url":"https://github.com/phusion/passenger-ruby-faye-websocket-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-ruby-faye-websocket-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-ruby-faye-websocket-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-ruby-faye-websocket-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-ruby-faye-websocket-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phusion","download_url":"https://codeload.github.com/phusion/passenger-ruby-faye-websocket-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phusion%2Fpassenger-ruby-faye-websocket-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259211928,"owners_count":22822385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T06:12:40.560Z","updated_at":"2025-06-11T06:12:51.732Z","avatar_url":"https://github.com/phusion.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phusion Passenger: Faye WebSocket demo\n\nThis application demonstrates WebSocket support in [the Phusion Passenger application server for Ruby](https://www.phusionpassenger.com/), through the use of the awesome [faye-websocket gem](https://github.com/faye/faye-websocket-ruby). Passenger supports all major modern web technologies, such as WebSockets, entirely out of the box. You don't have to do anything: WebSocket support just works.\n\nIf you like this demo, please [tweet about it](https://twitter.com/share) or [follow us on Twitter](https://twitter.com/phusion_nl).\n\n**Table of contents**\n\n * [Getting started](#getting_started)\n   * [Running the demo in Passenger Standalone](#running_standalone)\n   * [Running the demo in Passenger for Nginx](#running_nginx)\n   * [Running the demo in Passenger for Apache](#running_apache)\n * [Notes](#notes)\n   * [Tuning](#tuning)\n   * [Multithreading not required](#multithreading_not_required)\n   * [Non-Faye demo](#non_faye_demo)\n * [Next steps](#next_steps)\n * [About Phusion Passenger](#about)\n\n\u003ccenter\u003e\u003cimg src=\"http://blog.phusion.nl/wp-content/uploads/2012/07/Passenger_chair_256x256.jpg\" width=\"150\" height=\"150\" alt=\"Phusion Passenger\"\u003e\u003c/center\u003e\n\n-------------------------------------------------------\n\n\u003ca name=\"getting_started\"\u003e\u003c/a\u003e\n## Getting started\n\n\u003ca name=\"preparations\"\u003e\u003c/a\u003e\n### Preparations\n\n 1. [Install Phusion Passenger](https://www.phusionpassenger.com/) 4.0.43 or later.\n 2. Clone this repository:\n\n        git clone https://github.com/phusion/passenger-ruby-faye-websocket-demo.git\n        cd passenger-ruby-faye-websocket-demo\n\n 3. Install dependencies:\n\n        bundle install\n\n\u003ca name=\"running_standalone\"\u003e\u003c/a\u003e\n### Running the demo in Passenger Standalone\n\nRun:\n\n    passenger start\n\nAccess the demo application at http://0.0.0.0:3000/ and see it in action.\n\n\u003ca name=\"running_nginx\"\u003e\u003c/a\u003e\n### Running the demo in Passenger for Nginx\n\nCreate a virtual host in your Nginx configuration file:\n\n    server {\n        listen 3000;\n        server_name passenger-ruby-faye-websocket.demo;\n        root /path-to/passenger-ruby-faye-websocket-demo/public;\n        passenger_enabled on;\n    }\n\nAdd `passenger-ruby-faye-websocket.demo` to your `/etc/hosts`:\n\n    echo 127.0.0.1 passenger-ruby-faye-websocket.demo | sudo tee -a /etc/hosts\n\nThen restart Nginx, and access the demo application at http://passenger-ruby-faye-websocket.demo:3000/\n\n\u003ca name=\"running_apache\"\u003e\u003c/a\u003e\n### Running the demo in Passenger for Apache\n\nApache itself doesn't work very well with WebSockets, so running in Apache is not recommended.\n\nCreate a virtual host in your Apache configuration file:\n\n    # Comment out if you already have a \"Listen 3000\" directive somewhere.\n    Listen 3000\n    # Comment out when using Apache \u003e= 2.4.\n    NameVirtualHost *:3000\n\n    \u003cVirtualHost *:3000\u003e\n        ServerName passenger-ruby-faye-websocket.demo\n        DocumentRoot /path-to/passenger-ruby-faye-websocket-demo/public\n    \u003c/VirtualHost\u003e\n\nAdd `passenger-ruby-faye-websocket.demo` to your `/etc/hosts`:\n\n    echo 127.0.0.1 passenger-ruby-faye-websocket.demo | sudo tee -a /etc/hosts\n\nThen restart Apache, and access the demo application at http://passenger-ruby-faye-websocket.demo:3000/\n\n\u003ca name=\"notes\"\u003e\u003c/a\u003e\n## Notes\n\n\u003ca name=\"tuning\"\u003e\u003c/a\u003e\n### Tuning\n\nYou may have to [tune Passenger for optimal Websocket performance](https://www.phusionpassenger.com/library/config/tuning_sse_and_websockets/).\n\n\u003ca name=\"multithreading_not_required\"\u003e\u003c/a\u003e\n### Multithreading not required\n\nWebSockets work great on both the open source variant of Phusion Passenger, as well as on [Phusion Passenger Enterprise](https://www.phusionpassenger.com/). Multithreading is *not* required for faye-websocket to work optimally, because faye-websocket uses EventMachine to serve WebSockets.\n\n\u003ca name=\"non_faye_demo\"\u003e\u003c/a\u003e\n### Non-Faye demo\n\nThere is also a Phusion Passenger + WebSocket demo that does not use the faye-websocket gem: https://github.com/phusion/passenger-ruby-websocket-demo. That demo is implemented using pure Rack and a low-level WebSocket parser library, showing you how things might work if you use WebSockets through a different gem.\n\n\u003ca name=\"next_steps\"\u003e\u003c/a\u003e\n## Next steps\n\n * Using WebSockets on Phusion Passenger? [Tweet about us](https://twitter.com/share), [follow us on Twitter](https://twitter.com/phusion_nl) or [fork us on Github](https://github.com/phusion/passenger).\n * Having problems? Please post a message at [the community discussion forum](https://groups.google.com/d/forum/phusion-passenger).\n\n[\u003cimg src=\"http://www.phusion.nl/assets/logo.png\"\u003e](http://www.phusion.nl/)\n\nPlease enjoy Phusion Passenger, a product by [Phusion](http://www.phusion.nl/). :-)\n\n\u003ca name=\"about\"\u003e\u003c/a\u003e\n## About Phusion Passenger\n\n\u003ca href=\"http://vimeo.com/phusionnl/review/80475623/c16e940d1f\"\u003e\u003cimg src=\"http://blog.phusion.nl/wp-content/uploads/2014/05/GameOfThronesVideo.png\" height=\"300\"\u003e\u003c/a\u003e\u003cbr\u003e\u003cem\u003ePhusion Passenger used in Game of Thrones Ascention\u003c/em\u003e\n\n[Phusion Passenger™](https://www.phusionpassenger.com/) is a web server and application server, designed to be fast, robust and lightweight. It takes a lot of complexity out of deploying web apps, adds powerful enterprise-grade features that are useful in production, and makes administration much easier and less complex. Phusion Passenger supports Ruby, Python, Node.js and Meteor, and is being used by high-profile companies such as **Apple, Pixar, New York Times, AirBnB, Juniper** etc as well as [over 350.000 websites](http://trends.builtwith.com/Web-Server/Phusion-Passenger).\n\n**Learn more:** [Website](https://www.phusionpassenger.com/) | [Documentation](https://www.phusionpassenger.com/library/) | [Support resources](https://www.phusionpassenger.com/documentation_and_support) | [Github](https://github.com/phusion/passenger) | [Twitter](https://twitter.com/phusion_nl) | [Blog](http://blog.phusion.nl/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphusion%2Fpassenger-ruby-faye-websocket-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphusion%2Fpassenger-ruby-faye-websocket-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphusion%2Fpassenger-ruby-faye-websocket-demo/lists"}