Hook is a backend-as-a-service platform that includes everything that you need to create web applications, without writing back-end code. It is flexible enought if you need a custom behaviour.
Firstly, You need node.js installed for commandline support.
Now, clone doubleleft/hook repository, cd into it and run sudo make
:
git clone https://github.com/doubleleft/hook.git
cd hook
make
Optionally configure your database preferences at app/config/database
. By
default it uses sqlite
as driver. The following additional drivers are
supported: mysql
, postgres
, sqlserver
and mongodb
.
NOTE: It's recommended to give ownership to your server's user on storage
directory: e.g. (chown -R www-data app/storage
).
Take a look at the wiki for more details.
For client specific documentation:
For the websocket itself:
php api/socket/server.php
And you may also need to setup a socket policy server:
perl -Tw api/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