ваше сообщение коммита

This commit is contained in:
2025-05-23 17:44:28 +03:00
parent 9aa842d238
commit 7de23551f7
24 changed files with 2990 additions and 306 deletions

View File

@@ -0,0 +1,21 @@
import path from 'path';
import fs from 'fs';
import { createHelia } from 'helia';
import { unixfs, globSource } from '@helia/unixfs';
import dns from 'node:dns/promises';
import { fileURLToPath } from 'url';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const db = require('../db');
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export async function checkDomain(domain) {
try {
const records = await dns.resolveAny(domain);
return { records };
} catch (e) {
return { error: e.message };
}
}