techtools
Головна / portal / src / status.ts

status.ts

TypeScript · 9 рядків

1// Стан сервісів стенда: чи відповідає порт на цій машині.
2import { probe } from '../../scripts/stand.ts'
3import { services } from './services.ts'
4
5export async function checkStatus(): Promise<Record<string, boolean>> {
6  const entries = await Promise.all(services.map(async s => [s.id, await probe(s.port)] as const))
7  return Object.fromEntries(entries)
8}
9