Explicit setup method, as recommended by Hannes.
This commit is contained in:
parent
9f06dc26f7
commit
4b0ad3ef6d
@ -146,7 +146,7 @@ BreaWebsite >> routes [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
BreaWebsite >> server [
|
BreaWebsite >> server [
|
||||||
^ server ifNil: [ server := Teapot configure: { #port ->8080 . #debugMode -> true } ]
|
^ server ifNil: [ self setup ]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
@ -154,6 +154,14 @@ BreaWebsite >> server: anObject [
|
|||||||
server := anObject
|
server := anObject
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
BreaWebsite >> setup [
|
||||||
|
^ server := Teapot
|
||||||
|
configure:
|
||||||
|
{(#port -> 8080).
|
||||||
|
(#debugMode -> true)}
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #'server handling' }
|
{ #category : #'server handling' }
|
||||||
BreaWebsite >> start [
|
BreaWebsite >> start [
|
||||||
"I define the config and start the server"
|
"I define the config and start the server"
|
||||||
|
Loading…
Reference in New Issue
Block a user