Implement API tests
This commit is contained in:
parent
beb2f7e558
commit
80daf7c749
5 changed files with 161 additions and 2 deletions
|
@ -54,4 +54,4 @@ router.all('*', async ctx => {
|
|||
// Register router
|
||||
app.use(router.routes());
|
||||
|
||||
module.exports = app;
|
||||
export default app;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue