[Cuis-dev] updating WebServer code - begging for help
Mark Volkmann
r.mark.volkmann at gmail.com
Fri Jun 14 16:05:44 PDT 2024
I'm using the WebServer class in the WebClient package. Any time I change a
"route", I have to restart the VM in order for the change to take effect.
There must be some way around this. Here's a very simple way to duplicate
what I'm seeing.
1. In a Workspace, enter Feature require: 'WebClient' and "Do it".
2. Define a class with a name like TestServer.
3. An an instance method named initialize containing the following:
initialize
WebServer new
listenOn: 3000;
addService: '/' action: [ :req | req send200Response: 'Hello
World!' ]
4. In the Workspace, enter TestServer new and "Do it".
5. In a web browser, browse localhost:3000 and verify that Hello World! is
displayed.
6. In the initialize method, change "Hello World!" to anything else and
save the change.
7. What can you do now so the new text appears when you browse that URL?
I have tried opening a Process Browser window, killing the "WebServer's
listener process", and restarting the server from the Workspace by
running TestServer
new again, but that doesn't work. The only thing that works for me is
saving and restarting the image, which of course is very tedious to do
after every code change.
--
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240614/129be8f6/attachment.htm>
More information about the Cuis-dev
mailing list