<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>quick start on 戲中話</title><link>https://blog.iphpo.com/tags/quick-start/</link><description>Recent content in quick start on 戲中話</description><generator>Hugo</generator><language>zh-tw</language><managingEditor>herb09638@gmail.com (Herb)</managingEditor><webMaster>herb09638@gmail.com (Herb)</webMaster><lastBuildDate>Sun, 01 Apr 2018 00:00:00 +0800</lastBuildDate><atom:link href="https://blog.iphpo.com/tags/quick-start/index.xml" rel="self" type="application/rss+xml"/><item><title>Nchan 基礎設定</title><link>https://blog.iphpo.com/blog/2018/04/nchan-%E5%9F%BA%E7%A4%8E%E8%A8%AD%E5%AE%9A-basic-setting/</link><pubDate>Sun, 01 Apr 2018 00:00:00 +0800</pubDate><author>herb09638@gmail.com (Herb)</author><guid>https://blog.iphpo.com/blog/2018/04/nchan-%E5%9F%BA%E7%A4%8E%E8%A8%AD%E5%AE%9A-basic-setting/</guid><description>&lt;h1 id="基礎設定"&gt;基礎設定&lt;/h1&gt;
&lt;p&gt;nchan提供了pub/sub的功能，所以最主要設定也會圍繞在這兩者之上&lt;/p&gt;
&lt;p&gt;最基礎的設定，就是指定兩個固定位置，提供pub/sub的功能&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;#...
http { 
 server {
 #...

 location = /sub {
 nchan_subscriber;
 nchan_channel_id $arg_id;
 }

 location = /pub {
 nchan_publisher;
 nchan_channel_id $arg_id;
 }
 }
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;這裡使用query string(get參數)id當作channel id&lt;/p&gt;</description></item></channel></rss>