Starting implementation of default app view body.
This commit is contained in:
parent
72e0c775e5
commit
81298aefba
@ -4,7 +4,8 @@ Class {
|
|||||||
#instVars : [
|
#instVars : [
|
||||||
'name',
|
'name',
|
||||||
'folder',
|
'folder',
|
||||||
'server'
|
'server',
|
||||||
|
'body'
|
||||||
],
|
],
|
||||||
#category : #Brea
|
#category : #Brea
|
||||||
}
|
}
|
||||||
@ -14,6 +15,11 @@ BreaApp >> appName [
|
|||||||
^ self name asCamelCase
|
^ self name asCamelCase
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
BreaApp >> body [
|
||||||
|
^ body ifNil: [ body := '' writeStream contents ]
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
BreaApp >> defaultView [
|
BreaApp >> defaultView [
|
||||||
^ '<!doctype html>
|
^ '<!doctype html>
|
||||||
@ -27,8 +33,7 @@ BreaApp >> defaultView [
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="container">
|
<main class="container">
|
||||||
<h1>', self name, '</h1>
|
', self body, '
|
||||||
<p>Probando<p>
|
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>'
|
</html>'
|
||||||
@ -48,7 +53,6 @@ BreaApp >> folder: aFileDirectory [
|
|||||||
BreaApp >> launch [
|
BreaApp >> launch [
|
||||||
| defaultRoute |
|
| defaultRoute |
|
||||||
defaultRoute := 'http://localhost:',self server server port asString, '/', self appName.
|
defaultRoute := 'http://localhost:',self server server port asString, '/', self appName.
|
||||||
"self server removeAllDynamicRoutes."
|
|
||||||
self server GET: self appName -> [ self defaultView ].
|
self server GET: self appName -> [ self defaultView ].
|
||||||
GoogleChrome openWindowOn: defaultRoute
|
GoogleChrome openWindowOn: defaultRoute
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user