zat.dev/zds
atproto pds · mirror of https://tangled.org/zat.dev/zds
zds 0.25.1 Latest 2 packages, all images
0
0
// Starts the pinned reference PDS (@atproto/pds) from PDS_* environment
// variables, the same way bluesky-social/pds's service entrypoint does.
// tools/interop/run.sh sets the environment.
import { PDS, envToCfg, envToSecrets, readEnv } from '@atproto/pds'
const env = readEnv()
const pds = await PDS.create(envToCfg(env), envToSecrets(env))
await pds.start()
console.log(`reference pds listening on ${env.port}`)
const stop = async () => {
await pds.destroy()
process.exit(0)
}
process.on('SIGTERM', stop)
process.on('SIGINT', stop)