mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 15:23:08 +02:00
Module 'request-stats' as import syntax (#4071)
This commit is contained in:
parent
6d004fde7c
commit
e2bf0067b2
2 changed files with 4 additions and 2 deletions
|
@ -75,6 +75,7 @@
|
||||||
"@types/redis": "2.8.10",
|
"@types/redis": "2.8.10",
|
||||||
"@types/request": "2.48.1",
|
"@types/request": "2.48.1",
|
||||||
"@types/request-promise-native": "1.0.15",
|
"@types/request-promise-native": "1.0.15",
|
||||||
|
"@types/request-stats": "3.0.0",
|
||||||
"@types/rimraf": "2.0.2",
|
"@types/rimraf": "2.0.2",
|
||||||
"@types/seedrandom": "2.4.27",
|
"@types/seedrandom": "2.4.27",
|
||||||
"@types/sharp": "0.21.1",
|
"@types/sharp": "0.21.1",
|
||||||
|
|
|
@ -5,13 +5,14 @@
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as http from 'http';
|
import * as http from 'http';
|
||||||
import * as http2 from 'http2';
|
import * as http2 from 'http2';
|
||||||
|
import * as https from 'https';
|
||||||
import * as zlib from 'zlib';
|
import * as zlib from 'zlib';
|
||||||
import * as Koa from 'koa';
|
import * as Koa from 'koa';
|
||||||
import * as Router from 'koa-router';
|
import * as Router from 'koa-router';
|
||||||
import * as mount from 'koa-mount';
|
import * as mount from 'koa-mount';
|
||||||
import * as compress from 'koa-compress';
|
import * as compress from 'koa-compress';
|
||||||
import * as logger from 'koa-logger';
|
import * as logger from 'koa-logger';
|
||||||
const requestStats = require('request-stats');
|
import * as requestStats from 'request-stats';
|
||||||
//const slow = require('koa-slow');
|
//const slow = require('koa-slow');
|
||||||
|
|
||||||
import activityPub from './activitypub';
|
import activityPub from './activitypub';
|
||||||
|
@ -95,7 +96,7 @@ function createServer() {
|
||||||
certs[k] = fs.readFileSync(config.https[k]);
|
certs[k] = fs.readFileSync(config.https[k]);
|
||||||
}
|
}
|
||||||
certs['allowHTTP1'] = true;
|
certs['allowHTTP1'] = true;
|
||||||
return http2.createSecureServer(certs, app.callback());
|
return http2.createSecureServer(certs, app.callback()) as https.Server;
|
||||||
} else {
|
} else {
|
||||||
return http.createServer(app.callback());
|
return http.createServer(app.callback());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue