get = function (key) {
  // env variables
  if (key === 'no_welcome_tab') {
    return (Number(getEnvVar('BEAKER_NO_WELCOME_TAB')) === 1)
  }
  // stored values
  return setupPromise.then(() => cbPromise(cb => {
    db.get(`SELECT value FROM settings WHERE key = ?`, [key], (err, row) => {
      if (row) {
        row = row.value
        if (JSON_ENCODED_SETTINGS.includes(key)) {
          try {
            row = JSON.parse(row)
          } catch (e) {
            row = defaultSettings[key]
          }
        }
      }
      if (typeof row === 'undefined') { row = defaultSettings[key] }
      cb(err, row)
    })
  }))
}
@param {string} key
@returns {boolean | Promise<string | number | object>}