Boot Process
app:
boot: src/index.ts
server:
main: src/server/server.ts
openapi: src/server/stitch.yaml
client:
main: src/ui/frontend.ts
shell: src/ui/index.html
openapi: src/ui/stitch.yaml
dev:
splitServe: true
port: 3000The boot process is the order App follows when these configuration entries are present. Project boot creates the shared app first, then backend and frontend services attach their own runtime behavior.
Boot Process Settings
- app.boot
- Creates the shared Express app and installs app-wide setup before services start.
- server.main
- Starts backend-specific setup and hands route registration to Dinner.
- server.openapi
- Points Dinner at the backend route definitions or Stitch file.
- client.main
- Starts frontend-specific setup and hands rendering to Forge.
- client.shell
- Provides the HTML document Forge renders into.
- client.openapi
- Points Forge at the frontend route definitions or Stitch file.
- dev.splitServe
- Controls whether router, frontend, and backend run as separate local services.
- dev.port
- Sets the public local development entrypoint.
app.boot
app.boot is imported first. Keep it focused on creating the Express app and shared process setup.
import express from "express";
export default function boot() {
const app = express();
app.use(express.json({ limit: "50mb" }));
return app;
}server.main
server.main receives the app created by app.boot. It installs backend-only middleware and then starts Dinner route registration.
import express from "express";
import { boot as bootBackend } from "@noego/app/client";
export default async function server(app: express.Express) {
app.use(express.json({ limit: "50mb" }));
return bootBackend();
}client.main
client.main starts the frontend service. Initialize resources needed by server-side Forge loaders here, then call client.boot(). In split-serve development this is a separate process from the backend API service, so loaders cannot rely on backend-only initialization.
import { client } from "@noego/app/client";
import { initDatabase } from "../server/repo/boot";
export default async function frontend() {
await initDatabase();
await client.boot();
}Startup sequence
Load configuration
Parse noego.config.yml and resolve configured paths relative to the project root.
Run app.boot
Import the project boot file and create the shared Express app.
Start server.main
Run backend setup, then register backend routes from server.openapi.
Start client.main
Run frontend setup, then register Forge rendering from client.openapi and client.shell.
Serve the router
Expose the configured dev.port and route requests to the right runtime service.