Slightly improve startup speed

This commit is contained in:
Shadowfacts 2020-12-07 21:26:03 -05:00
parent e831ef285f
commit a3edf19134
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,6 @@ async function generate(): Promise<Page[]> {
const posts = await generate();
await activitypub.articles.setup(posts);
const toFederate = await activitypub.articles.toFederate();
const apRouter = Router();
apRouter.use(validateHttpSig);
@ -97,9 +96,10 @@ async function generate(): Promise<Page[]> {
});
const port = process.env.PORT || 8083;
app.listen(port, () => {
app.listen(port, async () => {
console.log(`Listening on port ${port}`);
const toFederate = await activitypub.articles.toFederate();
activitypub.federate(toFederate);
});
})();