diff --git a/repository/Brea/BreaApp.class.st b/repository/Brea/BreaApp.class.st index ad1c7a8..cc70765 100644 --- a/repository/Brea/BreaApp.class.st +++ b/repository/Brea/BreaApp.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'name', 'folder', - 'server', + 'host', 'componets' ], #category : #Brea @@ -77,8 +77,9 @@ BreaApp >> folder: aFileDirectory [ { #category : #accessing } BreaApp >> launch [ | defaultRoute | - defaultRoute := 'http://localhost:',self server server port asString, '/', self appName. - self server GET: self appName -> [ self defaultView ]. + defaultRoute := 'http://localhost:',self webHost server port asString, '/', self appName. + self webHost + GET: self appName -> [ self defaultView ]. GoogleChrome openWindowOn: defaultRoute ] @@ -98,6 +99,6 @@ BreaApp >> parentFolder: anObject [ ] { #category : #accessing } -BreaApp >> server [ - ^ server ifNil: [ server := MiniDocsServer singleton ] +BreaApp >> webHost [ + ^ host ifNil: [ host := Teapot allInstances detect: [ :each | each webHost isRunning ]] ] diff --git a/repository/Brea/String.extension.st b/repository/Brea/String.extension.st index 448ac73..edba3ae 100644 --- a/repository/Brea/String.extension.st +++ b/repository/Brea/String.extension.st @@ -2,5 +2,5 @@ Extension { #name : #String } { #category : #'*Brea' } String >> webView [ - ^ Pandoc htmlStringToMarkdown: self + ^ (Pandoc htmlStringToMarkdown: self) accentedCharactersCorrection ] diff --git a/repository/Brea/Teapot.extension.st b/repository/Brea/Teapot.extension.st new file mode 100644 index 0000000..99e5436 --- /dev/null +++ b/repository/Brea/Teapot.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Teapot } + +{ #category : #'*Brea' } +Teapot >> dynamicRoutes [ + ^ dynamicRouter routes +]