forked from FoundKeyGang/FoundKey
wip
This commit is contained in:
parent
3368fe8552
commit
c54ff5b2bc
2 changed files with 7 additions and 3 deletions
|
@ -150,6 +150,7 @@
|
|||
"js-yaml": "3.11.0",
|
||||
"jsdom": "11.7.0",
|
||||
"koa": "^2.5.0",
|
||||
"koa-bodyparser": "^4.2.0",
|
||||
"koa-favicon": "^2.0.1",
|
||||
"koa-mount": "^3.0.0",
|
||||
"koa-multer": "^1.0.2",
|
||||
|
|
|
@ -8,6 +8,7 @@ import * as https from 'https';
|
|||
import * as Koa from 'koa';
|
||||
import * as Router from 'koa-router';
|
||||
import * as bodyParser from 'koa-bodyparser';
|
||||
import * as mount from 'koa-mount';
|
||||
|
||||
import activityPub from './activitypub';
|
||||
import webFinger from './webfinger';
|
||||
|
@ -27,15 +28,17 @@ if (config.url.startsWith('https')) {
|
|||
});
|
||||
}
|
||||
|
||||
app.use(mount('/api', require('./api')));
|
||||
app.use(mount('/files', require('./file')));
|
||||
|
||||
// Init router
|
||||
const router = new Router();
|
||||
|
||||
// Routing
|
||||
router.use('/api', require('./api'));
|
||||
router.use('/files', require('./file'));
|
||||
router.use(activityPub.routes());
|
||||
router.use(webFinger.routes());
|
||||
router.use(require('./web'));
|
||||
|
||||
app.use(mount(require('./web')));
|
||||
|
||||
// Register router
|
||||
app.use(router.routes());
|
||||
|
|
Loading…
Reference in a new issue