forked from shadowfacts/shadowfacts.net
Slightly improve startup speed
This commit is contained in:
parent
e831ef285f
commit
a3edf19134
|
@ -61,7 +61,6 @@ async function generate(): Promise<Page[]> {
|
||||||
const posts = await generate();
|
const posts = await generate();
|
||||||
|
|
||||||
await activitypub.articles.setup(posts);
|
await activitypub.articles.setup(posts);
|
||||||
const toFederate = await activitypub.articles.toFederate();
|
|
||||||
|
|
||||||
const apRouter = Router();
|
const apRouter = Router();
|
||||||
apRouter.use(validateHttpSig);
|
apRouter.use(validateHttpSig);
|
||||||
|
@ -97,9 +96,10 @@ async function generate(): Promise<Page[]> {
|
||||||
});
|
});
|
||||||
|
|
||||||
const port = process.env.PORT || 8083;
|
const port = process.env.PORT || 8083;
|
||||||
app.listen(port, () => {
|
app.listen(port, async () => {
|
||||||
console.log(`Listening on port ${port}`);
|
console.log(`Listening on port ${port}`);
|
||||||
|
|
||||||
|
const toFederate = await activitypub.articles.toFederate();
|
||||||
activitypub.federate(toFederate);
|
activitypub.federate(toFederate);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue