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();
|
||||
|
||||
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);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue