{JSON.stringify(props.evaluations, null, 2)}
- diff --git a/main.ts b/main.ts index 33adef3..ed15b90 100644 --- a/main.ts +++ b/main.ts @@ -7,28 +7,27 @@ console.log("----------------------------------\n\n") const run = async (cmd: string[]) => { const commandText = cmd.join(" ") - const proc = spawn(cmd, { stdout: "inherit", stderr: "inherit" }) - console.log(`ðŠī "${commandText}" spawned with PID ${proc.pid}`) + const proc = spawn(cmd, { + stdout: "inherit", + stderr: "inherit", + }) - try { - const status = await proc.exited + const status = await proc.exited + + if (status !== 0) { + throw new Error(`Process "${commandText}" failed with exit code ${status}`) + } else { console.log(`ð Process ${commandText}(PID ${proc.pid}) exited with code ${status}`) - - if (status !== 0) { - throw new Error(`Process "${commandText}" failed with exit code ${status}`) - } - - return status - } catch (err) { - console.error(`ðĨ Error waiting for "${commandText}" exit:`, err) - throw err } + + return status } try { - await Promise.all([run(["bun", "bot:discord"]), run(["bun", "http"])]) + await Promise.all([run(["bun", "run", "--filter=@workshop/http", "start"]), run(["bun", "bot:discord"])]) console.log("â All processes completed successfully") } catch (error) { + console.log(`ð`, error.message) console.error("â One or more processes failed:", error) process.exit(1) } diff --git a/packages/http/README.md b/packages/http/README.md index f99c128..b710186 100644 --- a/packages/http/README.md +++ b/packages/http/README.md @@ -1,3 +1,9 @@ -# Nano Remix (BETTER NAME NEEDED) +# http -- You'll want to add `.nano-remix` to your `.gitignore` file. +A proxy server that will start all subdomain servers and a proxy server to route requests to the correct subdomain based on the URL. + +## How to setup a subdomain server + +1. Create a new package in the `packages` directory. +2. Add a `serve-subdomain` script to the `package.json` file of the new package. +3. It uses the directory name of the package to serve the subdomain. diff --git a/packages/http/src/components/createReminder.tsx b/packages/http/src/components/createReminder.tsx deleted file mode 100644 index e8fb833..0000000 --- a/packages/http/src/components/createReminder.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { Form } from "@workshop/nano-remix" -import { users } from "@workshop/shared/reminders" - -type Props = { - loading: boolean - success: boolean - error?: string -} -export const CreateReminder = (props: Props) => { - return ( -
{JSON.stringify(props.evaluations, null, 2)}
- No reminders found.
- ) : ( -