Skip to main content

Add-ons

rapidrest generate docker

Adds a Dockerfile and docker-compose.yml, configured for whichever datastores your project already has set up.

rapidrest generate docker
docker-compose up
FlagDescription
--output-dir <path>Project directory to add to. Defaults to the current directory
-f, --forceOverwrite existing files

Safe to re-run with --force whenever your project's datastores change. It regenerates the output from the current project state rather than patching the existing files.

rapidrest generate k8s

Adds a Helm chart under helm/.

rapidrest generate k8s
FlagDescription
--output-dir <path>Project directory to add to. Defaults to the current directory
-f, --forceOverwrite existing files

Same idempotent-regeneration behavior as generate docker.

rapidrest generate default-route

Scaffolds one or more of the default routes (BaseAdminRoute, BaseMetricsRoute, BaseOpenAPIRoute, BaseStatusRoute, BasePushRoute, BaseACLRoute, BaseStaticRoute) into an existing project.

rapidrest generate default-route
rapidrest generate default-route --type admin --type metrics
rapidrest generate default-route --type static --static-path public --api
FlagDescription
-f, --forceOverwrite existing files
--api [version]Use @ApiRoute instead of @Route for the generated route(s). Pass a value to specify an API version
--author <name>
--output-dir <path>Defaults to ./src/routes
-t, --type <name>One of acl, admin, metrics, openapi, push, static, status. Pass more than once to generate multiple route types
--static-path <path>Only meaningful with --type static. Path containing the static files to serve. Defaults to public

If --type is omitted, you're prompted interactively to check off which routes to generate (Admin, Metrics, OpenAPI, and Status are checked by default; ACL and Static aren't).

rapidrest generate react NAME

Adds SSR React support to an existing project.

rapidrest generate react app
rapidrest generate react app --path /dashboard --hydrate
FlagDescription
--output-dir <path>Project directory to add to. Defaults to the current directory
--author <name>
--path <base-path>Base path the app routes to. Defaults to /<NAME>
--hydrateEnables client-side hydration
-f, --forceOverwrite existing files

rapidrest generate react-page APP NAME

Adds a page to an existing React app.

rapidrest generate react-page app Dashboard
rapidrest generate react-page app Dashboard --service

# NAME can include a subpath
rapidrest generate react-page app my/path/page --service
FlagDescription
--output-dir <path>Project directory to add to. Defaults to the current directory
--author <name>
-s, --serviceAlso generate a companion service class for server-side data fetching (see Data Fetching)
-f, --forceOverwrite existing files

NAME may include a subpath (e.g. my/path/page). Each segment is PascalCased to derive the generated component/service name (my/path/pageMyPathPage).