links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Building and Deploying a Small Web application (Pharo)
Last updated at 2:47 pm UTC on 7 September 2017

Uses the construction

 ZnServer startDefaultOn: 8080.
 ZnServer default delegate map: #image to: MyFirstWebApp new.

Some adaptions are needed to do the tutorial in Squeak with WebServer.

Something like this
 (WebServer reset default) listenOn: 8080.
 WebServer default addService: '/image' action:[:req |
		req send200Response: (MyFirstWebApp new handleRequest: req)
and more.

It is probably easier to just use HttpView2 and in particular HVHttpView.
A HVHttpView an object that handles a HttpRequest and returns a result.