import { c as defineEventHandler } from '../../../_/nitro.mjs';
import { readdirSync } from 'fs';
import { resolve } from 'path';
import { parseArticle } from './_shared.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';

const list_get = defineEventHandler(async () => {
  const articlesPath = resolve(process.env.VAXLA_CONFIG, "articles");
  const articles = readdirSync(articlesPath);
  const parsedArticles = articles.map(parseArticle);
  return { articles: parsedArticles };
});

export { list_get as default };
//# sourceMappingURL=list.get.mjs.map
