enwikuna / wordpress-playground-plugin-loader

This service is a Node.js service which runs on a server providing an endpoint which can be used inside a WordPress Playground Blueprint to securely download a plugin from a protected folder on the server e.g. to provide a plugin demo.
GNU General Public License v3.0
1 stars 0 forks source link

Project questions #2

Open bgrgicak opened 1 month ago

bgrgicak commented 1 month ago

I'm trying to run the server and test it, but I have issues with the setup.

I will list all of my questions and try to answer them as much as I can.

Once that's done, I can move it to a readme.

bgrgicak commented 1 month ago

There is no initial setup for testing, I need to find out what environment variables to set and how. It would be great if there was some test data. Maybe a .env file to make things work out of the box. @enwikuna could you help me with this part?

I'm working on the initial setup in this PR . I'm able to request a token by calling http://localhost:3000/token/protected but I don't have Redis locally so I need to find a way to make that work.

I will probably add instructions for loading a server using Docker, but I think that it would be ideal to drop Redis as a dependency.

enwikuna commented 1 month ago

Thanks for writing down the required points from your point of view required to run the server. I will add a Postman Collection V2 to the project, which can be loaded inside Postman for testing. I will also describe the process working with the loader inside the readme.

Getting rid of Redis will not work, since we somehow need to keep track of each token session. I would suggest adding a Docker container running Redis. Redis is the easiest way to handle sessions like we use (and need).

bgrgicak commented 1 month ago

I will add a Postman Collection V2 to the project, which can be loaded inside Postman for testing.

Thank you!

Getting rid of Redis will not work, since we somehow need to keep track of each token session. I would suggest adding a Docker container running Redis. Redis is the easiest way to handle sessions like we use (and need).

Why wouldn't a global variable work here? It could be loaded together with the serve and store state while the server is alive. Sorry, I might be missing something.

I would suggest adding a Docker container running Redis. Redis is the easiest way to handle sessions like we use (and need).

I will do that for my development environment PR.

bgrgicak commented 1 month ago

This PR adds development instructions that should help with testing https://github.com/enwikuna/wordpress-playground-plugin-loader/pull/3

bgrgicak commented 1 month ago

I feel like this project is only missing a how-to-use example. Once it's done, let's find some community members to test it.