Starting default views.
This commit is contained in:
parent
a96dd95359
commit
f3a1927615
@ -9,6 +9,30 @@ Class {
|
||||
#category : #Brea
|
||||
}
|
||||
|
||||
{ #category : #accessing }
|
||||
BreaApp >> appName [
|
||||
^ self name asCamelCase
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
BreaApp >> defaultView [
|
||||
^ '<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<link rel="stylesheet" href="css/pico.min.css">
|
||||
<title>Hello from', self appName, '</title>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
<h1>Hello world!</h1>
|
||||
</main>
|
||||
</body>
|
||||
</html>'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
BreaApp >> folder [
|
||||
^ folder
|
||||
@ -21,7 +45,10 @@ BreaApp >> folder: aFileDirectory [
|
||||
|
||||
{ #category : #accessing }
|
||||
BreaApp >> launch [
|
||||
^ MiniDocsServer singleton
|
||||
| defaultRoute |
|
||||
defaultRoute := 'http://localhost:',self server server port asString, '/', self appName.
|
||||
self server GET: self appName -> self defaultView.
|
||||
GoogleChrome openWindowOn: defaultRoute
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user