Skip to content

Add @objectstack/cli serve command to examples#392

Merged
hotlong merged 3 commits intomainfrom
copilot/start-examples-api-service
Feb 7, 2026
Merged

Add @objectstack/cli serve command to examples#392
hotlong merged 3 commits intomainfrom
copilot/start-examples-api-service

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

Enables examples to run as API servers via @objectstack/cli serve, providing GraphQL and REST endpoints with sample data.

Changes

  • Example packages: Added serve script to todo and kitchen-sink examples (CRM already had it)

    "scripts": {
      "serve": "objectstack serve objectstack.config.ts"
    }
  • Root convenience scripts: Added serve:crm, serve:todo, serve:kitchen-sink for starting examples from monorepo root

  • Documentation: Updated README.md and examples/todo/README.md with usage instructions

Usage

# From root
pnpm run serve:todo

# Or from example directory
cd examples/todo && pnpm serve

Server starts on http://localhost:3000 with GraphQL at /graphql and REST endpoints based on object definitions.

Original prompt

使用@objectstack/cli 启动项目下的examples,作为api服务端。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 7, 2026 4:44pm
objectui-console Error Error Feb 7, 2026 4:44pm
objectui-storybook Ready Ready Preview, Comment Feb 7, 2026 4:44pm

Request Review

Copilot AI and others added 2 commits February 7, 2026 16:37
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add examples as API server using @objectstack/cli Add @objectstack/cli serve command to examples Feb 7, 2026
Copilot AI requested a review from hotlong February 7, 2026 16:41
@hotlong hotlong marked this pull request as ready for review February 7, 2026 17:48
Copilot AI review requested due to automatic review settings February 7, 2026 17:48
@hotlong hotlong merged commit 0159168 into main Feb 7, 2026
3 of 4 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds convenient serve entrypoints so the example workspaces can be started as API servers via @objectstack/cli, and documents the workflow at the repo and example level.

Changes:

  • Added root-level convenience scripts (serve:crm, serve:todo, serve:kitchen-sink) to run example servers from the monorepo root.
  • Added serve scripts to the Todo and Kitchen Sink example packages using objectstack serve objectstack.config.ts.
  • Updated documentation (root README and todo README) with instructions and endpoints.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Adds root convenience serve:* scripts that run example serve via pnpm filters.
examples/todo/package.json Adds serve script using objectstack serve objectstack.config.ts.
examples/todo/README.md Documents running Todo as an API server and updates build/type-check commands.
examples/kitchen-sink/package.json Adds serve script using objectstack serve objectstack.config.ts.
README.md Expands examples section and documents how to run examples as API servers.

Comment thread examples/todo/README.md
Comment on lines +72 to +75
pnpm --filter @object-ui/example-todo build

# Run type checking
pnpm --filter @objectstack/example-todo typecheck
pnpm --filter @object-ui/example-todo typecheck
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README instructs running pnpm --filter @object-ui/example-todo typecheck, but this package doesn’t define a typecheck (or type-check) script in examples/todo/package.json, so the command will fail. Either add a type-checking script to the package (e.g., tsc --noEmit) or update the README to point to the correct repo-wide type-check command.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants