···8899This script allows you to run any command with a fresh, ephemeral/single-use postgres database available. When the script starts a Dockerized postgres container starts-up, and when the script completes that container is removed.
10101111-The environment variable `DB_POSTGRES_URL` will be set with a connection string that can be used to connect to the database. The [`PG*` environment variables](https://www.postgresql.org/docs/current/libpq-envars.html) that are recognized by libpq (i.e. used by the `psql` client) are also set.
1111+The environment variable `DATABASE_URL` will be set with a connection string that can be used to connect to the database. The [`PG*` environment variables](https://www.postgresql.org/docs/current/libpq-envars.html) that are recognized by libpq (i.e. used by the `psql` client) are also set.
12121313**Example**
1414
···33// this with kysely's FileMigrationProvider, but it doesn't play nicely with the build process.
4455export * as _20221020T204908820Z from './20221020T204908820Z-operations-init'
66+export * as _20230223T215019669Z from './20230223T215019669Z-refactor'
+1-2
packages/server/src/routes.ts
···11import express from 'express'
22-import { sql } from 'kysely'
32import { check } from '@atproto/common'
43import * as plc from '@did-plc/lib'
54import { ServerError } from './error'
···1110 router.get('/_health', async function (req, res) {
1211 const { db, version } = ctx
1312 try {
1414- await sql`select 1`.execute(db.db)
1313+ await db.healthCheck()
1514 } catch (err) {
1615 req.log.error(err, 'failed health check')
1716 return res.status(503).send({ version, error: 'Service Unavailable' })