From 81298aefbaa4f69469404161d1cca3754c84d215 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 30 Mar 2024 10:24:17 -0500 Subject: [PATCH] Starting implementation of default app view body. --- repository/Brea/BreaApp.class.st | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/repository/Brea/BreaApp.class.st b/repository/Brea/BreaApp.class.st index c0c47a6..855aaac 100644 --- a/repository/Brea/BreaApp.class.st +++ b/repository/Brea/BreaApp.class.st @@ -4,7 +4,8 @@ Class { #instVars : [ 'name', 'folder', - 'server' + 'server', + 'body' ], #category : #Brea } @@ -14,6 +15,11 @@ BreaApp >> appName [ ^ self name asCamelCase ] +{ #category : #accessing } +BreaApp >> body [ + ^ body ifNil: [ body := '' writeStream contents ] +] + { #category : #accessing } BreaApp >> defaultView [ ^ ' @@ -27,8 +33,7 @@ BreaApp >> defaultView [
-

', self name, '

-

Probando

+ ', self body, '

' @@ -48,7 +53,6 @@ BreaApp >> folder: aFileDirectory [ BreaApp >> launch [ | defaultRoute | defaultRoute := 'http://localhost:',self server server port asString, '/', self appName. - "self server removeAllDynamicRoutes." self server GET: self appName -> [ self defaultView ]. GoogleChrome openWindowOn: defaultRoute ]