DEMOS / Simple Comet

Nitrogen allows you to spawn a comet process in one line of code using the wf:comet/1 function.

With comet, you can execute some task asynchronously, and then push the results to the browser as they are available.

In this demo, a comet process simply increments a counter once per second.

View Module Source
Counter updated via Comet: -
Copyright © 2008-2024 Nitrogen Web Framework. Released under the MIT License.