Code Monkey home page Code Monkey logo

hook's Introduction

Welcome to hook Build status

hook is a extendable Back-end as a Service (BaaS) that includes everything that you need to create the back-end of your application.

Installation

Clone doubleleft/hook repository, cd into it and run make:

git clone https://github.com/doubleleft/hook.git
cd hook
make

To create and deploy hook apps, you'll need to clone and install hook-cli (Commandline Interface)

Vagrant/Saltstack

Clone doubleleft/hook repository, in your /Projects dir and cd into it.

Have a look in Vagrantfile and customize it for your needs.

Type:

vagrant up

In order to deploy in a production server with Saltstack, make sure you already have Salt installed. You can install it like this:

curl -L https://bootstrap.saltstack.com | sudo sh

Our salt formula accept some parameters. By default it should work out of the box in a Vagrant environment. The default values are setup like this:

project_path: /vagrant
project_username: vagrant
proj_name: myproject
domain_name: localhost

If deploying through command line, you can customize this values like this:

cd your/directory/root/project
sudo salt-call -c salt state.highstate pillar='{project_path: your/directory/root/path, project_username: your-ssh-username, proj_name: hook, domain_name: hook.mydomain.com}'

If you are deploying inside vagrant itself through vagrant-linode, vagrant-digitalocean or vagrant-aws for example, you could fill the salt pillar arguments right into Vagrantfile, like this, for ex:

  config.vm.provision :salt do |salt|
    salt.minion_config = "salt/minion"
    salt.run_highstate = true
    salt.colorize = true
    salt.pillar({
      "project_path" => "/srv/www/hook",
      "project_username" => "ubuntu",
      "proj_name" => "hook",
      "domain_name" => "hook.mydomain.com"
    })
  end

How to use

Take a look at the wiki for more details.

For client specific documentation:

Websocket

For the websocket itself:

php socket/server.php

And you may also need to setup a socket policy server:

perl -Tw socket/flash_socketpolicy.pl

Its set to listen on port 8430 in order to be able to run it as an unprivileged user, but as the script needs to bind in port 843 we can forward ports.

With iptables we can apply the following rule (of curse with sudo or as root user):

sudo iptables -t nat -A PREROUTING -p tcp --dport 843 -j REDIRECT --to-port 8430

Or with ipfw on Mac OS X:

sudo ipfw add 100 fwd 127.0.0.1,8430 tcp from any to me 843 in

License

MIT. Please see LICENSE file.

hook's People

Contributors

alinefr avatar endel avatar gabriel-laet avatar gilnak avatar matheusrrocha avatar vicalejuri avatar wagnermoschini 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.