#!/usr/bin/env node

import { exec } from "node:child_process";
import { resolve } from "node:path";
import { fileURLToPath } from "url";

const process = exec(
  "npm run start",
  { cwd: resolve(fileURLToPath(import.meta.url), "..") },
  (error, stdout, stderr) => {
    if (error) {
      console.error(`${error}`);
      return;
    }
    console.log(`${stdout}`);
    console.error(`${stderr}`);
  }
);
process.stdout.on("data", (data) => console.log(data));
process.stderr.on("data", (data) => console.error(data));
