



server {

get ( '/' ) {

render 'Hello World!'

}

get ( '/spanish' ) {

render 'Hola Mundo!'

}

get ( '/salute/:name' ) {

render "Hello ${req.params.name}!"

}

} . start ( 3000 )



trait DomFinder {

@GsNative

private List selectItems ( selector ) {



}



def propertyMissing ( String name ) {

selectItems ( "#$name" ) ? : selectItems ( ".$name" )

}

}



presenter . foo . collect { it . value ( ) }

. findAll { it . contains 'bar' }

. sort { it . size ( ) }









ul {

languages . each {

li ( class : it . style ) {

yield it . name . capitalize ( )

}

if ( it . photo ) {

img it . photo

}

}

}

