michaelneu / webxcel

🤔 A REST backend built with plain VBA Microsoft Excel macros. Yes. Macros.
https://dev.to/michaelneu/to-vba-and-beyond---building-a-restful-backend-using-plain-microsoft-excel-macros-76n
MIT License
438 stars 70 forks source link

Docs for Beginners... #26

Open Stevefb opened 5 years ago

Stevefb commented 5 years ago

I wasn't sure how to get the server working... here's where I'm at:

Struggled with PowerShell _(first time using PSISE): When I opened a file in PS-ISE I didn't notice that I still needed to navigate to the working directory in order to load the other files.

Server started, what should be expected? When I started the server, as expected, things froze. Wasn't sure what to do next... so opened a chrome tab and went to http://127.0.0.1:8080 (nothing loaded). Messed around in the code and eventually figured out I could navigate to: http://localhost:8081/workbook/Sheet1 (pleasing results, I see JSON)...

Deleting the lock file: When I delete the lock file the server still spins its wheels for a while, if (after deleting the lock file) I refresh my browser on this page: http://127.0.0.1:8080 Excel becomes responsive almost instantly (otherwise it remains unresponsive).

This is awesome!

michaelneu commented 4 years ago

The lock file workaround will be removed some day, as I figured out a way to have the sockets "less-blocking" in a different project, but I didn't come around to actually port this over to webxcel yet. The reason it stays unresponsive after deleting the lock file is because it's still stuck at the accept() call, which will be over as soon as you try to reload the page from your browser - which initiates a new connection, yielding a socket handle in the accept() call. This is badly written currently, but a fix is technically feasible.

As for the PowerShell confusion: maybe we need a better documentation, the readme is maybe not the best place to explain how to get started. Thanks for taking the time to type up these docs though :+1:

Depending on how you started your server, the index.html should be picked up when appropriately configured. Again, this requires some documentation, as it's not obvious that FileSystemWebController supports this.

sancarn commented 1 year ago

The lock file workaround will be removed some day, as I figured out a way to have the sockets "less-blocking" in a different project

Care to elaborate so others can perhaps contribute?