-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide API/Example to use to remotedev-server from other applications #34
Comments
PyRedux looks amazing! I've just published a docs draft with Python examples. Feel free to amend it. I used to be a fan of Django, but it was almost 10 years ago and already forgot everything. |
The docs look amazing! I will try to do the integration-work in the next Days. Thank you for your (well documented) reply on such short notice! |
The documentation is quite helpful, but i guess there is something wrong or left out. I am able to connect to the server, to "authenticate" as "master" and to send the INIT-Command (I can see the visualization). When i then send a lifted-STATE (sniffed by another application), then I am able to reproduce the logged state-tree (everything is visualized as expected). However, sending a request with: data = {
"type": "ACTION",
"payload": {
"todos": "do some"
},
"action": {
"timestamp": 1483349708506,
"action": {
"type": "ADD_TODO",
"text": "hggg"
}
},
"instanceId": "tAmA7H5fclyWhvizAAAi",
"name": "LoggerInstance",
"id": "tAmA7H5fclyWhvizAAAi"
}
socket.emit("log", data) # No difference when i use "log-noid" I could use the lifted-state, but than i would have to provide values like: |
I just tried your snippet (on NodeJS) and I'm getting var scClient = require('socketcluster-client');
var socket = scClient.connect({ hostname: 'localhost', port: 8000 });
socket.connect();
socket.on('error', function(error) {
console.error('Socket error', error);
});
socket.emit('login', 'master', function(error, channelName) {
if (error) { console.log(error); return; }
socket.subscribe(channelName);
var data = {
"type": "ACTION",
"payload": {
"todos": "do some"
},
"action": {
"timestamp": 1483349708506,
"action": {
"type": "ADD_TODO",
"text": "hggg"
}
},
"instanceId": "tAmA7H5fclyWhvizAAAi",
"name": "LoggerInstance",
"id": "tAmA7H5fclyWhvizAAAi"
};
socket.emit("log", data);
}); |
Maybe data = {
"type": "ACTION",
"payload": json.dumps({
"todos": "do some"
}),
"action": json.dumps({
"timestamp": 1483349708506,
"action": {
"type": "ADD_TODO",
"text": "hggg"
})
},
"instanceId": "tAmA7H5fclyWhvizAAAi",
"name": "LoggerInstance",
"id": "tAmA7H5fclyWhvizAAAi"
}; |
you were right about the socket-cluster-client - stringification, but in another way. When you pass in a string into the |
If there would be a piece of documentation / an basic example, then other appliactions
and even other programming-languages could use this project. In concrete i try to integrate
my redux-python-port:
https://github.com/peterpeter5/pyredux
with this server. But i think it could be interesting for other people / applications.
The text was updated successfully, but these errors were encountered: