forked from fossasia/open-event-wsgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
24 lines (22 loc) · 682 Bytes
/
cli.js
File metadata and controls
24 lines (22 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"use strict";
var fs = require('fs');
var io = require('socket.io-client');
const config = require('./config.json');
var request = require('request').defaults({'proxy': config.proxy});
var client = io.connect('http://127.0.0.1:5000');
var i = 1;
client.on('connect', function () {
if (i === 1) {
i = 0;
var data = {
name: 'testapp',
email: 'a@a.com',
theme: 'light',
datasource: 'eventapi',
assetmode: 'download',
apiendpoint: process.argv[3] || "https://eventyay.com/api/v1/events/6" || process.env.GH_ENDPOINT
};
client.emit('live', data);
}
client.close();
});