Implement API tests

This commit is contained in:
syuilo
2018-10-16 06:37:21 +09:00
parent beb2f7e558
commit 80daf7c749
5 changed files with 161 additions and 2 deletions

View File

@ -54,4 +54,4 @@ router.all('*', async ctx => {
// Register router
app.use(router.routes());
module.exports = app;
export default app;

View File

@ -18,6 +18,7 @@ import activityPub from './activitypub';
import webFinger from './webfinger';
import config from '../config';
import { updateNetworkStats } from '../services/update-chart';
import apiServer from './api';
// Init app
const app = new Koa();
@ -47,7 +48,7 @@ if (config.url.startsWith('https')) {
});
}
app.use(mount('/api', require('./api')));
app.use(mount('/api', apiServer));
app.use(mount('/files', require('./file')));
// Init router