[Cuis-dev] Cuis web package
Mark Volkmann
r.mark.volkmann at gmail.com
Wed Jun 12 07:27:44 PDT 2024
Is it possible the issue is that when I run the code from a Workspace, the
server does not get garbage collected, but when I run it from within the
`initialize` method, it does get garbage collected?
On Tue, Jun 11, 2024 at 8:42 PM Mark Volkmann <r.mark.volkmann at gmail.com>
wrote:
> I created a class named `MyWebServer` and added this `initialize` method.
>
> initialize
> "demonstrates using the WebServer class"
>
> server := WebServer new listenOn: 1961.
> server addService: '/' action: [ :req | req send200Response: 'Home
> Page' ].
> server addService: '/hello' action: [ :req | req send200Response:
> 'Hello World!' ]
>
> Then I entered this in a Workspace and ran "Do it":
>
> MyWebServer new
>
> This started a process named "WebServer's listener process" that I see in
> a Process Browser window.
>
> If I browse localhost:1961, the browser just hangs. But if I enter that
> same code in a Workspace, both routes work fine.
> What am I missing?
>
> On Tue, Jun 11, 2024 at 7:24 PM Mark Volkmann <r.mark.volkmann at gmail.com>
> wrote:
>
>> Thank you so much! This is exactly what I was looking for.
>>
>> On Tue, Jun 11, 2024 at 1:05 AM Bernhard Pieber via Cuis-dev <
>> cuis-dev at lists.cuis.st> wrote:
>>
>>> Feature require: 'WebClient'.
>>>
>>> See class WebServer
>>>
>>> Cheers,
>>> Bernhard
>>>
>>>
>>> > Am 10.06.2024 um 14:39 schrieb Mark Volkmann via Cuis-dev <
>>> cuis-dev at lists.cuis.st>:
>>> >
>>> > Can someone recommend a package I should look at to learn about
>>> implementing HTTP endpoints in Cuis?
>>> >
>>> > ---
>>> > R. Mark Volkmann
>>> > Object Computing, Inc.
>>> > --
>>> > Cuis-dev mailing list
>>> > Cuis-dev at lists.cuis.st
>>> > https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>
>>>
>>> --
>>> Cuis-dev mailing list
>>> Cuis-dev at lists.cuis.st
>>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>
>>
>>
>> --
>> R. Mark Volkmann
>> Object Computing, Inc.
>>
>
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
>
--
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240612/15c13b7d/attachment-0001.htm>
More information about the Cuis-dev
mailing list