194 lines
10 KiB
HTML
194 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
|
|
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
|
|
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
|
|
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
|
|
|
|
<title>Ipe by dimiro1</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
<div class="container">
|
|
<h1>Ipe</h1>
|
|
<h2>A Pusher server implementation compatible with Pusher client libraries written in GO</h2>
|
|
|
|
<section id="downloads">
|
|
<a href="https://github.com/dimiro1/ipe/zipball/master" class="btn">Download as .zip</a>
|
|
<a href="https://github.com/dimiro1/ipe/tarball/master" class="btn">Download as .tar.gz</a>
|
|
<a href="https://github.com/dimiro1/ipe" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
|
|
</section>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container">
|
|
<section id="main_content">
|
|
|
|
<h3>
|
|
<span class="octicon octicon-book"></span>
|
|
README.md
|
|
</h3>
|
|
|
|
<article class="markdown-body entry-content" itemprop="mainContentOfPage"><h1>
|
|
<a id="user-content-ipÊ" class="anchor" href="#ip%C3%8A" aria-hidden="true"><span class="octicon octicon-link"></span></a>IPÊ</h1>
|
|
|
|
<p>This software is written in Go - the WYSIWYG lang</p>
|
|
|
|
<h1>
|
|
<a id="user-content-why-i-wrote-this-software" class="anchor" href="#why-i-wrote-this-software" aria-hidden="true"><span class="octicon octicon-link"></span></a>Why I wrote this software?</h1>
|
|
|
|
<ol class="task-list">
|
|
<li>I wanted to learn Go and I needed a non trivial application;</li>
|
|
<li>I use Pusher in some projects;</li>
|
|
<li>I really like Pusher;</li>
|
|
</ol>
|
|
|
|
<h1>
|
|
<a id="user-content-features" class="anchor" href="#features" aria-hidden="true"><span class="octicon octicon-link"></span></a>Features</h1>
|
|
|
|
<ul class="task-list">
|
|
<li>Public Channels;</li>
|
|
<li>Private Channels;</li>
|
|
<li>Presence Channels;</li>
|
|
<li>Web Hooks;</li>
|
|
<li>Client events;</li>
|
|
<li>Complete REST API;</li>
|
|
<li>Easy instalation;</li>
|
|
<li>A single binary without dependencies;</li>
|
|
<li>Easy configuration;</li>
|
|
<li>Protocol version 7;</li>
|
|
<li>Multiple apps in the same instance;</li>
|
|
<li>Drop in replacement for pusher server;</li>
|
|
</ul>
|
|
|
|
<h1>
|
|
<a id="user-content-building" class="anchor" href="#building" aria-hidden="true"><span class="octicon octicon-link"></span></a>Building</h1>
|
|
|
|
<p>This software use the standard GOPATH structure and Godep as "dependency manager", so, install <a href="https://github.com/tools/godep">godep</a> first.</p>
|
|
|
|
<div class="highlight highlight-console"><pre>$ <span class="pl-s2">go get github.com/tools/godep</span>
|
|
$ <span class="pl-s2">godep get github.com/dimiro1/ipe</span></pre></div>
|
|
|
|
<h1>
|
|
<a id="user-content-how-to-configure" class="anchor" href="#how-to-configure" aria-hidden="true"><span class="octicon octicon-link"></span></a>How to configure?</h1>
|
|
|
|
<h2>
|
|
<a id="user-content-the-server" class="anchor" href="#the-server" aria-hidden="true"><span class="octicon octicon-link"></span></a>The server</h2>
|
|
|
|
<div class="highlight highlight-json"><pre>{
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Host<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>:8080<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Expvar<span class="pl-pds">"</span></span>: <span class="pl-c1">true</span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>User<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>Username<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Password<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>123456<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Apps<span class="pl-pds">"</span></span>: [
|
|
{
|
|
<span class="pl-s1"><span class="pl-pds">"</span>ApplicationDisabled<span class="pl-pds">"</span></span>: <span class="pl-c1">false</span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>OnlySSL<span class="pl-pds">"</span></span>: <span class="pl-c1">false</span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Secret<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>APP_SECRET<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Key<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>APP_KEY<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>Name<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>APP_NAME<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>AppID<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>APP_ID<span class="pl-pds">"</span></span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>UserEvents<span class="pl-pds">"</span></span>: <span class="pl-c1">true</span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>WebHooks<span class="pl-pds">"</span></span>: <span class="pl-c1">true</span>,
|
|
<span class="pl-s1"><span class="pl-pds">"</span>URLWebHook<span class="pl-pds">"</span></span>: <span class="pl-s1"><span class="pl-pds">"</span>http://localhost:4567/php/hook.php<span class="pl-pds">"</span></span>
|
|
}
|
|
]
|
|
}</pre></div>
|
|
|
|
<h2>
|
|
<a id="user-content-libraries" class="anchor" href="#libraries" aria-hidden="true"><span class="octicon octicon-link"></span></a>Libraries</h2>
|
|
|
|
<h3>
|
|
<a id="user-content-client-javascript-library" class="anchor" href="#client-javascript-library" aria-hidden="true"><span class="octicon octicon-link"></span></a>Client javascript library</h3>
|
|
|
|
<div class="highlight highlight-javascript"><pre><span class="pl-s">var</span> pusher <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">Pusher</span>(API_KEY, {
|
|
wsHost<span class="pl-k">:</span> <span class="pl-s1"><span class="pl-pds">'</span>localhost<span class="pl-pds">'</span></span>,
|
|
wsPort<span class="pl-k">:</span> <span class="pl-c1">8080</span>,
|
|
enabledTransports<span class="pl-k">:</span> [<span class="pl-s1"><span class="pl-pds">"</span>ws<span class="pl-pds">"</span></span>, <span class="pl-s1"><span class="pl-pds">"</span>flash<span class="pl-pds">"</span></span>],
|
|
disabledTransports<span class="pl-k">:</span> [<span class="pl-s1"><span class="pl-pds">"</span>flash<span class="pl-pds">"</span></span>]
|
|
});</pre></div>
|
|
|
|
<h3>
|
|
<a id="user-content-client-server-libraries" class="anchor" href="#client-server-libraries" aria-hidden="true"><span class="octicon octicon-link"></span></a>Client server libraries</h3>
|
|
|
|
<p>Ruby</p>
|
|
|
|
<div class="highlight highlight-ruby"><pre><span class="pl-s3">Pusher</span>.host <span class="pl-k">=</span> <span class="pl-s1"><span class="pl-pds">'</span>localhost<span class="pl-pds">'</span></span>
|
|
<span class="pl-s3">Pusher</span>.port <span class="pl-k">=</span> <span class="pl-c1">8080</span></pre></div>
|
|
|
|
<p>PHP</p>
|
|
|
|
<div class="highlight highlight-php"><pre><span class="pl-s2"><span class="pl-vo">$pusher</span> <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-s3">Pusher</span>(<span class="pl-c1">APP_KEY</span>, <span class="pl-c1">APP_SECRET</span>, <span class="pl-c1">APP_ID</span>, <span class="pl-c1">DEBUG</span>, <span class="pl-s1"><span class="pl-pds">"</span>http://localhost<span class="pl-pds">"</span></span>, <span class="pl-s1"><span class="pl-pds">"</span>8080<span class="pl-pds">"</span></span>);</span></pre></div>
|
|
|
|
<p>NodeJS</p>
|
|
|
|
<div class="highlight highlight-javascript"><pre><span class="pl-s">var</span> pusher <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">Pusher</span>({
|
|
appId<span class="pl-k">:</span> APP_ID,
|
|
key<span class="pl-k">:</span> APP_KEY,
|
|
secret<span class="pl-k">:</span> APP_SECRET
|
|
domain<span class="pl-k">:</span> <span class="pl-s1"><span class="pl-pds">'</span>localhost<span class="pl-pds">'</span></span>,
|
|
port<span class="pl-k">:</span> <span class="pl-c1">80</span>
|
|
});
|
|
</pre></div>
|
|
|
|
<h1>
|
|
<a id="user-content-logging" class="anchor" href="#logging" aria-hidden="true"><span class="octicon octicon-link"></span></a>Logging</h1>
|
|
|
|
<p>This software uses the <a href="https://github.com/golang/glog">glog</a> library</p>
|
|
|
|
<p>for more information about logging type the following in console.</p>
|
|
|
|
<div class="highlight highlight-console"><pre>$ <span class="pl-s2">ipe -h</span></pre></div>
|
|
|
|
<h1>
|
|
<a id="user-content-when-use-this-software" class="anchor" href="#when-use-this-software" aria-hidden="true"><span class="octicon octicon-link"></span></a>When use this software?</h1>
|
|
|
|
<ul class="task-list">
|
|
<li>When you are offline;</li>
|
|
<li>When you want to control your infrastructure;</li>
|
|
<li>When you do not want to have external dependencies;</li>
|
|
<li>When you want extend the protocol;</li>
|
|
</ul>
|
|
|
|
<h1>
|
|
<a id="user-content-contributing" class="anchor" href="#contributing" aria-hidden="true"><span class="octicon octicon-link"></span></a>Contributing.</h1>
|
|
|
|
<p>Feel free to fork this repo.</p>
|
|
|
|
<h1>
|
|
<a id="user-content-pusher" class="anchor" href="#pusher" aria-hidden="true"><span class="octicon octicon-link"></span></a>Pusher</h1>
|
|
|
|
<p>Pusher is an excelent service, their service is very realible. I recomend for everyone.</p>
|
|
|
|
<h1>
|
|
<a id="user-content-where-this-name-came-from" class="anchor" href="#where-this-name-came-from" aria-hidden="true"><span class="octicon octicon-link"></span></a>Where this name came from?</h1>
|
|
|
|
<p>Here in Brazil we have this beatiful tree called <a href="http://en.wikipedia.org/wiki/Tabebuia_aurea">Ipê</a>, it comes in differente colors: yellow, pink, white, purple.</p>
|
|
|
|
<p><a href="https://www.flickr.com/search/?q=ipe">I want to see pictures</a></p>
|
|
|
|
<h1>
|
|
<a id="user-content-author" class="anchor" href="#author" aria-hidden="true"><span class="octicon octicon-link"></span></a>Author</h1>
|
|
|
|
<p>Claudemiro Alves Feitosa Neto</p>
|
|
|
|
<h1>
|
|
<a id="user-content-license" class="anchor" href="#license" aria-hidden="true"><span class="octicon octicon-link"></span></a>LICENSE</h1>
|
|
|
|
<p>Copyright 2014 Claudemiro Alves Feitosa Neto. All rights reserved.
|
|
Use of this source code is governed by a MIT-style
|
|
license that can be found in the LICENSE file.</p>
|
|
</article>
|
|
|
|
</section>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|