From f79b067574ea48c8b25b02cc529eb9b8fd661b68 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Sat, 29 Jun 2024 17:21:29 -0700 Subject: [PATCH] docs(pockethost): Added serve command details --- .changeset/1719706889788.md | 5 +++++ packages/pockethost/readme.md | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .changeset/1719706889788.md diff --git a/.changeset/1719706889788.md b/.changeset/1719706889788.md new file mode 100644 index 00000000..f4076687 --- /dev/null +++ b/.changeset/1719706889788.md @@ -0,0 +1,5 @@ +--- +'pockethost': patch +--- + +Added serve command details \ No newline at end of file diff --git a/packages/pockethost/readme.md b/packages/pockethost/readme.md index 5c318f24..d3dafd57 100644 --- a/packages/pockethost/readme.md +++ b/packages/pockethost/readme.md @@ -16,6 +16,7 @@ Extend PocketHost with its Plugin ecosystem. Start with the bare-bones dev serve - [Quickstart](#quickstart) - [Introduction](#introduction) +- [The magic `serve` command](#the-magic-serve-command) - [Configuration](#configuration) - [Plugins Directory](#plugins-directory) - [Writing Plugins](#writing-plugins) @@ -39,6 +40,32 @@ Use PocketHost for development or production purposes. PocketHost can be easily extended using its thoughtful plugin architecture. By choosing additional plugins, PocketHost's features can be extended according to your exact needs. You can even write your own plugins. +## The magic `serve` command + +`pockethost serve` is a special command that can be decorated with plugins. Plugins can respond to the `serve` command by running their own services. + +By convention, plugins that have some kind of `serve` functionality such as running a server, will make it available in two ways. + +The first way runs ONLY the plugin's `serve` functionality: + +```bash +pockethost serve +``` + +The second way runs ALL `serve` functionality from ALL plugins: + +```bash +pockethost serve +``` + +The exact plugins can also be narrowed: + +```bash +pockethost serve --only=plugin1,plugin2,plugin3 +``` + +See the plugin authoring guide for more information on how to make a plugin that responds to both methods. + ## Configuration PocketHost supports configuration by environment variable, `.env` file, and also built-in settings via `pockethost config`.