1
0
mirror of https://github.com/balkian/hookio-sparql-demo.git synced 2025-09-02 02:22:20 +00:00

Initial commit

This commit is contained in:
J.Fernando Sánchez
2012-03-16 23:13:44 +01:00
commit 24975d56a4
12 changed files with 142 additions and 0 deletions

1
hookio/config.json Normal file
View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,5 @@
#!/bin/bash
for i in `npm bin`/hookio-*
do
$i &
done

28
hookio/monkey.js Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/nodejs
var Hook = require('hook.io').Hook,
express = require('express'),
app = express.createServer(),
io = require('socket.io').listen(app);
app.listen(8008);
io.sockets.on('connection', function (socket) {
socket.emit('news', { hello: 'world' });
socket.on('my other event', function (data) {
console.log(data);
});
});
var monkey = new Hook({
name: "monkey-hook",
debug: true
});
monkey.on('hook::ready', function () {
console.log('I am online :D');
});
monkey.start(1337);