import { c as defineEventHandler, e as createError } from '../../_/nitro.mjs';
import { g as getVaxlaConfig } from '../../_/index.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import 'node:module';
import '../../virtual/_commonjsHelpers.mjs';
import 'node:os';
import 'node:assert';
import 'node:process';
import 'node:v8';
import 'node:util';
import 'node:tty';
import 'node:perf_hooks';
import 'node:vm';
import '../../virtual/_util.mjs';
import 'assert';
import 'util';
import '../../virtual/_path.mjs';
import 'fs';
import 'path';
import 'module';
import '../../virtual/_os.mjs';
import 'os';
import 'process';
import 'tty';
import 'url';
import 'v8';
import 'child_process';

const config_get = defineEventHandler(async () => {
  const configPath = process.env.VAXLA_CONFIG;
  if (!configPath) {
    throw createError({
      statusCode: 500,
      statusMessage: "VAXLA_CONFIG is not set"
    });
  }
  const config = await getVaxlaConfig(configPath);
  return { config };
});

export { config_get as default };
