import { RequestHandler } from 'express'
import { get } from './db'

const handler: RequestHandler = async (_, res) => {
  try {
    const config = await get()
    res.json(config)
  } catch (ex) {
    res.status(500).json({ message: ex.message || ex })
  }
}

export default handler

import { RequestHandler } from 'express'
import { getConfig as get } from './db'

const handler: RequestHandler = async (_, res) => {
  try {
    const config = await get()
    res.json(config)
  } catch (ex) {
    res.status(500).json({ message: ex.message || ex })
  }
}

export default handler

Use managed config cache in GET config responses
Use managed config cache in GET config responses
