Commit 8cb9af878eeb8e5cb1514ea2a3d9cc4bfb5c7433
1 parent
5d7389c497
Exists in
master
vre.start()
Showing 2 changed files with 30 additions and 1 deletions Side-by-side Diff
package.json
... | ... | @@ -26,6 +26,7 @@ |
26 | 26 | "ini": "~1.3.4", |
27 | 27 | "sate24": "git+http://git@gitlab.kodesumber.com/reload97/node-sate24.git", |
28 | 28 | "sate24-expresso": "git+http://gitlab.kodesumber.com/reload97/sate24-expresso.git", |
29 | - "xmlrpc": "~1.3.1" | |
29 | + "xmlrpc": "~1.3.1", | |
30 | + "winston": "~2.1.1" | |
30 | 31 | } |
31 | 32 | } |
vre.js
1 | 1 | var xmlrpc = require('xmlrpc'); |
2 | + | |
3 | +var config; | |
4 | +var callbackReport; | |
5 | +var aaa; | |
6 | +var logger; | |
7 | + | |
8 | +function start(_config, _callbackReport, options) { | |
9 | + config = _config; | |
10 | + callbackReport = _callbackReport; | |
11 | + | |
12 | + if (options && options.aaa) { | |
13 | + aaa = options.aaa; | |
14 | + } | |
15 | + | |
16 | + if (options && options.logger) { | |
17 | + logger = options.logger; | |
18 | + } else { | |
19 | + logger = new winston.Logger({ | |
20 | + transports: [ | |
21 | + new (winston.transports.Console)() | |
22 | + ] | |
23 | + }); | |
24 | + } | |
25 | + | |
26 | + createServer(); | |
27 | +} | |
28 | + | |
29 | +exports.start = start; |