Default server shared with the one serving MiniDocs.
This commit is contained in:
parent
a8d12ec46f
commit
2d811e9f38
@ -4,7 +4,7 @@ Class {
|
|||||||
#instVars : [
|
#instVars : [
|
||||||
'name',
|
'name',
|
||||||
'folder',
|
'folder',
|
||||||
'server',
|
'host',
|
||||||
'componets'
|
'componets'
|
||||||
],
|
],
|
||||||
#category : #Brea
|
#category : #Brea
|
||||||
@ -77,8 +77,9 @@ BreaApp >> folder: aFileDirectory [
|
|||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
BreaApp >> launch [
|
BreaApp >> launch [
|
||||||
| defaultRoute |
|
| defaultRoute |
|
||||||
defaultRoute := 'http://localhost:',self server server port asString, '/', self appName.
|
defaultRoute := 'http://localhost:',self webHost server port asString, '/', self appName.
|
||||||
self server GET: self appName -> [ self defaultView ].
|
self webHost
|
||||||
|
GET: self appName -> [ self defaultView ].
|
||||||
GoogleChrome openWindowOn: defaultRoute
|
GoogleChrome openWindowOn: defaultRoute
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -98,6 +99,6 @@ BreaApp >> parentFolder: anObject [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
BreaApp >> server [
|
BreaApp >> webHost [
|
||||||
^ server ifNil: [ server := MiniDocsServer singleton ]
|
^ host ifNil: [ host := Teapot allInstances detect: [ :each | each webHost isRunning ]]
|
||||||
]
|
]
|
||||||
|
@ -2,5 +2,5 @@ Extension { #name : #String }
|
|||||||
|
|
||||||
{ #category : #'*Brea' }
|
{ #category : #'*Brea' }
|
||||||
String >> webView [
|
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