-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (24 loc) · 761 Bytes
/
index.js
File metadata and controls
31 lines (24 loc) · 761 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
25
26
27
28
29
30
31
/**
* File: index.js
* Author: Alexander Ksenofontov <aksenofo@yahoo.ru>
*
* Created on August 10, 2016, 14:56 PM
*/
var debug, withDebug;
debug = false;
if (typeof v8debug !== "undefined" && v8debug !== null) {
// console.log("v8 debug detected");
debug = true;
}
withDebug = process.execArgv.indexOf('--debug') > -1 || process.execArgv.indexOf('--debug-brk') > -1;
if (withDebug) {
// console.log("started with debug flag, port: " + process.debugPort);
debug = true;
}
if ((typeof v8debug === "undefined" || v8debug === null) && !withDebug) {
// console.log("neither detected");
}
if(debug)
module.exports = require("./build/Debug/teonet_client.node")
else
module.exports = require("./build/Release/teonet_client.node")