Giter Site home page Giter Site logo

lbaracat / ipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dimiro1/ipe

0.0 1.0 0.0 367 KB

An open source Pusher server implementation compatible with Pusher client libraries written in GO

Home Page: http://dimiro1.github.io/ipe

License: MIT License

Shell 0.15% JavaScript 5.94% Go 92.52% HTML 0.70% Dockerfile 0.57% Procfile 0.12%

ipe's Introduction

Go Report Card

Try browsing the code on Sourcegraph!

IPÊ

An open source Pusher server implementation compatible with Pusher client libraries written in Go.

Why I wrote this software?

  1. I wanted to learn Go and I needed a non trivial application;
  2. I use Pusher in some projects;
  3. I really like Pusher;
  4. I was using Pusher on some projects behind a firewall;

Features

  • Public Channels;
  • Private Channels;
  • Presence Channels;
  • Web Hooks;
  • Client events;
  • Complete REST API;
  • Easy installation;
  • A single binary without dependencies;
  • Easy configuration;
  • Protocol version 7;
  • Multiple apps in the same instance;
  • Drop in replacement for pusher server;

Download pre built binaries

You can download pre built binaries from the releases tab.

Building

$ go get github.com/dimiro1/ipe

or simply

$ go install github.com/dimiro1/ipe

Building from a local checkout

$ git clone https://github.com/dimiro1/ipe.git
$ cd ipe/cmd
$ go build -o ipe

How to configure?

The server

---
host: ":8080"
profiling: false
ssl:
  enabled: false
  host: ":4343"
  key_file: "key.pem"
  cert_file: "cert.pem"
apps:
  - name: "Sample Application"
    enabled: true
    only_ssl: false
    key: "278d525bdf162c739803"
    secret: "${APP_SECRET}" # Expand env vars
    app_id: "1"
    user_events: true
    webhooks:
      enabled: true
      url: "http://127.0.0.1:5000/hook"

Libraries

Client javascript library

let pusher = new Pusher(APP_KEY, {
  wsHost: 'localhost',
  wsPort: 8080,
  wssPort: 4433,    // Required if encrypted is true
  encrypted: false, // Optional. the application must use only SSL connections
  enabledTransports: ["ws", "flash"],
  disabledTransports: ["flash"]
});

Client server libraries

Ruby

Pusher.host = 'localhost'
Pusher.port = 8080

PHP

$pusher = new Pusher(APP_KEY, APP_SECRET, APP_ID, DEBUG, "http://localhost", "8080");

Go

package main

import "github.com/pusher/pusher-http-go"

func main() {
	client := pusher.Client{
        AppId:  "APP_ID",
        Key:    "APP_KEY",
        Secret: "APP_SECRET",
        Host:   ":8080",
    }
	
	// use the client
}

NodeJS

let pusher = new Pusher({
  appId: APP_ID,
  key: APP_KEY,
  secret: APP_SECRET
  domain: 'localhost',
  port: 80
});

Logging

This software uses the glog library

for more information about logging type the following in console.

$ ipe -h

When use this software?

  • When you are offline;
  • When you want to control your infrastructure;
  • When you do not want to have external dependencies;
  • When you want extend the protocol;

Contributing.

Feel free to fork this repo.

Pusher

Pusher is an excellent service, their service is very reliable. I recommend for everyone.

Where this name came from?

Here in Brazil we have this beautiful tree called Ipê, it comes in differente colors: yellow, pink, white, purple.

I want to see pictures

Author

Claudemiro Alves Feitosa Neto

LICENSE

Copyright 2014, 2018 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.

ipe's People

Contributors

dimiro1 avatar tssajo avatar jweslley avatar lbaracat avatar craigjmidwinter avatar izimobil avatar sj26 avatar orthographic-pedant avatar asalei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.