forked from deepstreamIO/deepstream.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.js
65 lines (48 loc) · 1.54 KB
/
start.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//require('v8-profiler');
//var fs = require('fs');
var Deepstream = require( './src/deepstream.io' );
// AmqpConnector = require( 'deepstream.io-msg-amqp' ),
// redis = require( 'deepstream.io-redis' );
var deepstream = new Deepstream();
// deepstream.set( 'host', process.env.IP );
// deepstream.set( 'port', process.env.PORT );
//deepstream.set( 'sslKey', fs.readFileSync( './private.key', 'utf-8' ) );
//deepstream.set( 'sslCert', fs.readFileSync( './public.cert', 'utf-8' ) );
// deepstream.set( 'messageConnector', new AmqpConnector({
// // Remote
// // login: 'nwixdpxf',
// // vhost: 'nwixdpxf',
// // password: 'YYY',
// // host: 'bunny.cloudamqp.com'
// //Local
// host: 'localhost',
// port: 5672
// }));
// deepstream.set( 'permissionHandler', {
// isValidUser: function( handshakeData, authData, callback ) {
// if( authData.username === 'Wolfram' ) {
// callback( null, authData.username );
// } else {
// callback( 'Invalid user' );
// }
// },
// canPerformAction: function( username, message, callback ) {
// callback( null, true );
// }
// });
// var redisOptions = {
// // Remote
// port: 15010,
// host: 'pub-redis-15010.us-east-1-4.4.ec2.garantiadata.com',
// password: 'YYY'
// //Local
// // port: 6379,
// // host: 'localhost'
// };
// deepstream.set( 'cache', new redis.CacheConnector( redisOptions ));
// deepstream.set( 'messageConnector', new redis.MessageConnector({
// port: 15010,
// host: 'pub-redis-15010.us-east-1-4.4.ec2.garantiadata.com',
// password: 'YYY'
// }));
deepstream.start();