[squeak-dev] Altitude - Hello World

Chris Cunnington smalltalktelevision at gmail.com
Wed Jul 18 00:15:08 UTC 2012


Sure, there's a shorter way with to do this. But it does produce Hello 
World.

Chris



ALApplication subclass: #ALHelloWorld
     instanceVariableNames: ''
     classVariableNames: ''
     poolDictionaries: ''
     category: 'AL-HelloWorld'



ALHelloWorld>>handleRequest: aRequest

     | html |
     html := String new writing
         write: 'Hello World';
         conclusion.
     ^ ALResponse status: 200 reason: 'OK' body: (ALEntity html: html)



app := ALHelloWorld new.

serv := ALServer on: 9995 application: app.

serv start




More information about the Squeak-dev mailing list