diff options
author | hailey <hailey@blueskyweb.xyz> | 2025-09-02 13:36:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-02 13:36:20 -0700 |
commit | acdc509630d5182f9f3d224b259e2a46000b1f27 (patch) | |
tree | 92d6b474bad9692e5b054ed8b693bca1cba816ac /bskylink/src/bin.ts | |
parent | b2258fb6cbdb5de79a7c7d848347f3f157059aa5 (diff) | |
download | voidsky-acdc509630d5182f9f3d224b259e2a46000b1f27.tar.zst |
safelink (#8917)
Co-authored-by: hailey <me@haileyok.com> Co-authored-by: Stanislas Signoud <signez@stanisoft.net> Co-authored-by: will berry <wsb@wills-MBP.attlocal.net> Co-authored-by: BlueSkiesAndGreenPastures <will@blueskyweb.xyz> Co-authored-by: Chenyu Huang <itschenyu@gmail.com>
Diffstat (limited to 'bskylink/src/bin.ts')
-rw-r--r-- | bskylink/src/bin.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bskylink/src/bin.ts b/bskylink/src/bin.ts index 17f068841..3e0746a98 100644 --- a/bskylink/src/bin.ts +++ b/bskylink/src/bin.ts @@ -1,5 +1,4 @@ import {Database, envToCfg, httpLogger, LinkService, readEnv} from './index.js' - async function main() { const env = readEnv() const cfg = envToCfg(env) @@ -11,7 +10,13 @@ async function main() { await migrateDb.migrateToLatestOrThrow() await migrateDb.close() } + const link = await LinkService.create(cfg) + + if (link.ctx.cfg.service.safelinkEnabled) { + link.ctx.safelinkClient.runFetchEvents() + } + await link.start() httpLogger.info('link service is running') process.on('SIGTERM', async () => { |