mirror of
https://github.com/balkian/Web4.0.git
synced 2024-11-05 00:31:42 +00:00
Added dummy server to test socket.io connections
This commit is contained in:
parent
f492485146
commit
8f56712380
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ configuration
|
||||
node_modules
|
||||
*.bak
|
||||
*.swp
|
||||
SOJA
|
||||
|
12
hookio/dummyServer.js
Normal file
12
hookio/dummyServer.js
Normal file
@ -0,0 +1,12 @@
|
||||
var io = require('socket.io').listen(3000);
|
||||
io.sockets.on('connection', function (socket) {
|
||||
console.log("New connection!");
|
||||
socket.on('test', function (data,ack) {
|
||||
console.log(data);
|
||||
var testObject = {"testKey" : "testValue", "testArray": ["value1", "value2", "value3"], "testDic": {"key1":"value1","key2":"value2"}, "testMix":["one",{"twoDic":["one","two"]}]};
|
||||
ack(testObject);
|
||||
console.log("I acked");
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user