Commit 765e010b by Chavee Issariyapat

update

parent be5b1b5a
......@@ -14,8 +14,6 @@ var client = senecaAMQP.client({
url: 'amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port')
});
//1----
console.log('amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port'));
module.exports = function(options={}) {
return function(req, res, next) {
......@@ -27,10 +25,14 @@ module.exports = function(options={}) {
}
var data = req.body;
console.log(123);
console.log(data.topic.substring(0,5));
console.log(123);
console.log(data.topic.substring(0,5));
//1----
console.log('amqp://'+config.get('rabbitmq_username')+':'+config.get('rabbitmq_password')+'@'+config.get('rabbitmq_host')+':'+config.get('rabbitmq_port'));
if (data.topic.substring(0,5) == '$exec') {
console.log(555);
var stopic = data.topic.substr(6);
var a = data.topic.split('/');
var ptext = Buffer.from(data.payload, 'base64').toString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment