FayeServer

46 views
Skip to first unread message

Nagendran V

unread,
Apr 24, 2019, 6:04:22 AM4/24/19
to Faye users
Hi,

I have configured the faye server and not started properly. Please anybody can help me

Here is my code,

var http = require('http');
var faye = require('faye');
var fayeRedis = require('faye-redis');

var server = http.createServer()
var bayeux = new faye.NodeAdapter({mount: '/', timeout: 500,
//engine:   {
    //type:   fayeRedis,
    //host:   'redis.example.com',
    //port:   8081
  //}
  });

// Handle non-Bayeux requests
var server = http.createServer(function(request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello, non-Bayeux request');
});

bayeux.attach(server);
server.listen(8081);
console.log(server);
console.log('Server running at http://192.168.0.2:8081/');
Faye.png
Reply all
Reply to author
Forward
0 new messages