This commit is contained in:
syuilo
2018-04-13 06:06:18 +09:00
parent a3bd4ba426
commit 3368fe8552
20 changed files with 582 additions and 609 deletions

View File

@ -13,7 +13,7 @@ import activityPub from './activitypub';
import webFinger from './webfinger';
import config from '../config';
// Init server
// Init app
const app = new Koa();
app.proxy = true;
app.use(bodyParser);
@ -46,9 +46,9 @@ function createServer() {
Object.keys(config.https).forEach(k => {
certs[k] = fs.readFileSync(config.https[k]);
});
return https.createServer(certs, app);
return https.createServer(certs, app.callback);
} else {
return http.createServer(app);
return http.createServer(app.callback);
}
}