parent
c73f11ad28
commit
f5ed36ced0
|
@ -3,8 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as http from 'http';
|
import * as http2 from 'http2';
|
||||||
import * as https from 'https';
|
|
||||||
import * as cluster from 'cluster';
|
import * as cluster from 'cluster';
|
||||||
import * as express from 'express';
|
import * as express from 'express';
|
||||||
import * as morgan from 'morgan';
|
import * as morgan from 'morgan';
|
||||||
|
@ -56,12 +55,12 @@ app.use(require('./web/server'));
|
||||||
* Create server
|
* Create server
|
||||||
*/
|
*/
|
||||||
const server = config.https.enable ?
|
const server = config.https.enable ?
|
||||||
https.createServer({
|
http2.createSecureServer({
|
||||||
key: fs.readFileSync(config.https.key),
|
key: fs.readFileSync(config.https.key),
|
||||||
cert: fs.readFileSync(config.https.cert),
|
cert: fs.readFileSync(config.https.cert),
|
||||||
ca: fs.readFileSync(config.https.ca)
|
ca: fs.readFileSync(config.https.ca)
|
||||||
}, app) :
|
}, app) :
|
||||||
http.createServer(app);
|
http2.createServer(app);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Steaming
|
* Steaming
|
||||||
|
|
Loading…
Reference in New Issue