Clean up
This commit is contained in:
parent
0f99469243
commit
70433469a1
|
@ -84,7 +84,6 @@
|
||||||
"@types/webpack-stream": "3.2.10",
|
"@types/webpack-stream": "3.2.10",
|
||||||
"@types/websocket": "0.0.38",
|
"@types/websocket": "0.0.38",
|
||||||
"@types/ws": "4.0.2",
|
"@types/ws": "4.0.2",
|
||||||
"accesses": "2.5.0",
|
|
||||||
"animejs": "2.2.0",
|
"animejs": "2.2.0",
|
||||||
"autosize": "4.0.1",
|
"autosize": "4.0.1",
|
||||||
"autwh": "0.1.0",
|
"autwh": "0.1.0",
|
||||||
|
|
|
@ -41,10 +41,6 @@ export type Source = {
|
||||||
secret_key: string;
|
secret_key: string;
|
||||||
};
|
};
|
||||||
accesslog?: string;
|
accesslog?: string;
|
||||||
accesses?: {
|
|
||||||
enable: boolean;
|
|
||||||
port: number;
|
|
||||||
};
|
|
||||||
twitter?: {
|
twitter?: {
|
||||||
consumer_key: string;
|
consumer_key: string;
|
||||||
consumer_secret: string;
|
consumer_secret: string;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import * as http from 'http';
|
||||||
import * as https from 'https';
|
import * as https from 'https';
|
||||||
import * as express from 'express';
|
import * as express from 'express';
|
||||||
import * as morgan from 'morgan';
|
import * as morgan from 'morgan';
|
||||||
import Accesses from 'accesses';
|
|
||||||
|
|
||||||
import activityPub from './activitypub';
|
import activityPub from './activitypub';
|
||||||
import webFinger from './webfinger';
|
import webFinger from './webfinger';
|
||||||
|
@ -21,16 +20,6 @@ const app = express();
|
||||||
app.disable('x-powered-by');
|
app.disable('x-powered-by');
|
||||||
app.set('trust proxy', 'loopback');
|
app.set('trust proxy', 'loopback');
|
||||||
|
|
||||||
// Log
|
|
||||||
if (config.accesses && config.accesses.enable) {
|
|
||||||
const accesses = new Accesses({
|
|
||||||
appName: 'Misskey',
|
|
||||||
port: config.accesses.port
|
|
||||||
});
|
|
||||||
|
|
||||||
app.use(accesses.express);
|
|
||||||
}
|
|
||||||
|
|
||||||
app.use(morgan(process.env.NODE_ENV == 'production' ? 'combined' : 'dev', {
|
app.use(morgan(process.env.NODE_ENV == 'production' ? 'combined' : 'dev', {
|
||||||
// create a write stream (in append mode)
|
// create a write stream (in append mode)
|
||||||
stream: config.accesslog ? fs.createWriteStream(config.accesslog) : null
|
stream: config.accesslog ? fs.createWriteStream(config.accesslog) : null
|
||||||
|
|
Loading…
Reference in New Issue