[Cuis-dev] Cuis web package
Mark Volkmann
r.mark.volkmann at gmail.com
Tue Jun 11 18:42:06 PDT 2024
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240611/231af7a0/attachment.htm>
More information about the Cuis-dev
mailing list