From f3a1927615cc0aaf36ba16b6baf0d971dd99cd37 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 29 Mar 2024 21:46:34 -0500 Subject: [PATCH] Starting default views. --- repository/Brea/BreaApp.class.st | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/repository/Brea/BreaApp.class.st b/repository/Brea/BreaApp.class.st index 73c42e7..d2ffe7a 100644 --- a/repository/Brea/BreaApp.class.st +++ b/repository/Brea/BreaApp.class.st @@ -9,6 +9,30 @@ Class { #category : #Brea } +{ #category : #accessing } +BreaApp >> appName [ + ^ self name asCamelCase +] + +{ #category : #accessing } +BreaApp >> defaultView [ + ^ ' + + + + + + + Hello from', self appName, ' + + +
+

Hello world!

+
+ +' +] + { #category : #accessing } BreaApp >> folder [ ^ folder @@ -21,7 +45,10 @@ BreaApp >> folder: aFileDirectory [ { #category : #accessing } BreaApp >> launch [ - ^ MiniDocsServer singleton + | defaultRoute | + defaultRoute := 'http://localhost:',self server server port asString, '/', self appName. + self server GET: self appName -> self defaultView. + GoogleChrome openWindowOn: defaultRoute ] { #category : #accessing }