Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
flexseth opened this issue Apr 3, 2024 · 2 comments
Closed
4 tasks done

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

flexseth opened this issue Apr 3, 2024 · 2 comments

Comments

@flexseth
Copy link

flexseth commented Apr 3, 2024

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

  • What happens if the server isn't stopped?

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

  • Server is constantly running in the background?

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

@ironnysh
Copy link

ironnysh commented Apr 6, 2024

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
Copy link
Author

flexseth commented Apr 17, 2024

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

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

No branches or pull requests

2 participants