diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-01-31 23:46:15 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-01-31 23:46:15 +0900 |
| commit | e2bf0067b2190ebae6187ca6ce8b29387c357dfc (patch) | |
| tree | 3ea6b1690f9b1e13ddab4351ae7c01f5a4538f0d /src | |
| parent | Module 'uuid' as import syntax (#4070) (diff) | |
| download | sharkey-e2bf0067b2190ebae6187ca6ce8b29387c357dfc.tar.gz sharkey-e2bf0067b2190ebae6187ca6ce8b29387c357dfc.tar.bz2 sharkey-e2bf0067b2190ebae6187ca6ce8b29387c357dfc.zip | |
Module 'request-stats' as import syntax (#4071)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 6762964258..de77975fd5 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -5,13 +5,14 @@ import * as fs from 'fs'; import * as http from 'http'; import * as http2 from 'http2'; +import * as https from 'https'; import * as zlib from 'zlib'; import * as Koa from 'koa'; import * as Router from 'koa-router'; import * as mount from 'koa-mount'; import * as compress from 'koa-compress'; import * as logger from 'koa-logger'; -const requestStats = require('request-stats'); +import * as requestStats from 'request-stats'; //const slow = require('koa-slow'); import activityPub from './activitypub'; @@ -95,7 +96,7 @@ function createServer() { certs[k] = fs.readFileSync(config.https[k]); } certs['allowHTTP1'] = true; - return http2.createSecureServer(certs, app.callback()); + return http2.createSecureServer(certs, app.callback()) as https.Server; } else { return http.createServer(app.callback()); } |