Default server shared with the one serving MiniDocs.
This commit is contained in:
parent
a8d12ec46f
commit
2d811e9f38
@ -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 ]]
|
||||
]
|
||||
|
@ -2,5 +2,5 @@ Extension { #name : #String }
|
||||
|
||||
{ #category : #'*Brea' }
|
||||
String >> webView [
|
||||
^ Pandoc htmlStringToMarkdown: self
|
||||
^ (Pandoc htmlStringToMarkdown: self) accentedCharactersCorrection
|
||||
]
|
||||
|
6
repository/Brea/Teapot.extension.st
Normal file
6
repository/Brea/Teapot.extension.st
Normal file
@ -0,0 +1,6 @@
|
||||
Extension { #name : #Teapot }
|
||||
|
||||
{ #category : #'*Brea' }
|
||||
Teapot >> dynamicRoutes [
|
||||
^ dynamicRouter routes
|
||||
]
|
Loading…
Reference in New Issue
Block a user