ruins
Version:
> [!IMPORTANT] > This is in beta. Not everything is ironed out and some modules might misbehave
15 lines • 560 B
JavaScript
import consola from "consola";
import { exec } from "child_process";
/**
* Opens the dashboard in the browser
*
* @param {string} ruinsPath - path to Ruins project directory
* @returns {Promise<void>}
*/
export const openDashboard = async (ruinsPath, binPath) => {
consola.start("Preparing dashboard");
await exec(`node ${ruinsPath}/api/.output/server/index.mjs`);
await exec(`${binPath}/http-server -p 4848 ${ruinsPath}/ui/dist/`);
consola.box("Dashboard available on http://localhost:4848");
};
//# sourceMappingURL=open-dashboard.js.map