|
@@ -13,6 +13,7 @@ var mkdirp = require('mkdirp')
|
13
|
13
|
var dirname = require('path').dirname
|
14
|
14
|
var app = express()
|
15
|
15
|
var fs = require('fs')
|
|
16
|
+var https = require('https')
|
16
|
17
|
|
17
|
18
|
var JS_SOURCE_PATH = '../test/',
|
18
|
19
|
LIB_SOURCE_PATH = '../src/',
|
|
@@ -24,6 +25,16 @@ watch(JS_SOURCE_PATH, APP_SOURCE_PATH)
|
24
|
25
|
// watch lib js source
|
25
|
26
|
watch(LIB_SOURCE_PATH, NODE_MODULE_MODULE_PATH, {ignored: /\.\.\/src\/(android|ios)\//})
|
26
|
27
|
|
|
28
|
+// https
|
|
29
|
+var server = https.createServer({
|
|
30
|
+ key : fs.readFileSync('./key.pem'),
|
|
31
|
+ cert : fs.readFileSync('./cert.pem')
|
|
32
|
+}, app).listen(8124, function(err){
|
|
33
|
+ if(!err)
|
|
34
|
+ console.log('SSL test server running at port ',8124)
|
|
35
|
+})
|
|
36
|
+
|
|
37
|
+// http
|
27
|
38
|
app.listen(8123, function(err){
|
28
|
39
|
if(!err)
|
29
|
40
|
console.log('test server running at port ',8123)
|