setIntervalã§å®æçã«evnetãéãã®ã¨ãredisã®Pub/Subãå©ç¨ãã¦eventãéãã®ã¨ãã2種é¡ãã¤ãã³ãçºçæã«ã¬ã¹ãã³ã¹ãæ¸ãåºãããã«ããã®ã¯ãEventEmitterãçµç±ãããresdisããeventãéãã®ã試ãã«ã¯redis-cliã使ã£ã¦ã'redis-cli publish node-sse-example:myevent foo'ã¿ããã«ããã°ãããã¯ã©ã¤ã¢ã³ããµã¤ãã®ã³ã¼ãã®ãä¸ç·ã«æ¸ãã¦ãããã©ãç°¡åã«å®è¡ã§ããããã«1ãã¡ã¤ã«ã«ãããã£ãããã§ãæ®éã¯åããæ¹ããããnginxã§reverse proxyããã¨ãã®ãããã¡ãªã³ã°ããªãã«ããããã«X-Accel-Bufferingãããã¼ãã¤ãã¦ããããããã¡ãªã³ã°ã«æ°ãã¤ããã°nginxçµç±ã§ãç°¡åã«åãã®ã§ãããã¯websocketããã ãã¶æ¥½ã var util = require(
{{#tags}}- {{label}}
{{/tags}}