adamziel / playground-docs-workflow

Experimenting with maintaining WordPress docs using WordPress Playground
https://adamziel.github.io/playground-docs-workflow/
11 stars 2 forks source link

wp-now: Error cases for when the user doesn't stop the server #33

Closed flexseth closed 4 months ago

flexseth commented 4 months ago

Possible error case

User starts the wp-now server via

git clone git@github.com:WordPress/playground-tools.git
cd playground-tools
nvm use
npm install
npm run build
nx preview wp-now start --path=/path/to/wordpress-plugin-or-theme

Closes VS Code or their editor without stopping the server...

Discovery

ironnysh commented 4 months ago

Hi @flexseth, I've added some clarification below (@adamziel, please correct me if I'm wrong. Don't want to spread misinformation...).

Possible error case

User starts the wp-now server via


git clone git@github.com:WordPress/playground-tools.git

cd playground-tools

nvm use

npm install

npm run build

nx preview wp-now start --path=/path/to/wordpress-plugin-or-theme

These instructions are only relevant when contributing to WP-NOW.

Closes VS Code or their editor without stopping the server...

Discovery

  • [ ] What happens if the server isn't stopped?

Nothing :-) It stops: no Docker involved.

  • [ ] How to stop the server with Activity Monitor or Task Manager (Windows), Linux

You could dig into the specific process in Activity Monitor (under Code/Terminal) and stop it using the UI, but that's both impractical and pointless: once you close the Terminal tab/window (or, in VS Code, for example, either close the window or "Kill" the Terminal), the process shuts down.

  • [ ] Server is constantly running in the background?

Yes, unless you actively stop it (Control+C or the methods described above).

  • [ ] What happens if they try to open the VS Code extension in this same folder as wp-now is running?

It launches the same instance in a new port.

flexseth commented 4 months ago

Linking to #31 - Docs for using wp-now - some of the quirks about how the server stops, and re-instantiates for sure will be helpful over there.

@ironnysh - Thanks for your notes above, these are solid. I have a few more notes about how the instance starts based on context I'll link for the wp-now docs