Skip to content

grapity serve

Start the local Grapity Registry server and optionally the Hub developer portal.

Usage

bash
grapity serve [options]

Description

grapity serve starts the Registry HTTP server on the configured port. By default, it also starts the Hub developer portal on a separate port.

Requires @grapity/registry to be installed (peer dependency).

Options

OptionDescriptionDefault
-p, --port <port>Port for the Registry server3750
--db <url>Database URL. SQLite path or postgresql:// URL~/.grapity/registry.db
--auth <mode>Auth mode: none, api-key, jwtnone
--hub-port <port>Port for the Hub developer portal3000
--no-hubSkip starting the developer portal(starts hub)

Examples

Default local mode

bash
grapity serve

Output:

text
Registry ready  ·  http://localhost:3750
Hub ready       ·  http://localhost:3000

With PostgreSQL

bash
grapity serve --db postgresql://user:pass@localhost:5432/grapity --auth jwt

Custom Hub port

bash
grapity serve --hub-port 8080

Registry only, no Hub

bash
grapity serve --no-hub

Custom grace period

bash
grapity serve --grace-period-days 90

Database backends

The CLI auto-detects the database backend from the --db value:

  • Starts with postgresql:// → PostgreSQL
  • Anything else (or omitted) → SQLite

Auth modes

ModeUse case
noneLocal development (default)
api-keySelf-hosted with shared API keys
jwtProduction with identity provider

Graceful shutdown

Press Ctrl+C to stop both servers cleanly.

See also

Released under the Apache 2.0 License.