Server defaults and exploratory button.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-03 13:57:22 -05:00
parent bd7f33a223
commit ac0912cb75
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@ LePageHeaderBuilder >> addRefreshWebViewButton [
label: 'Refresh web view'; label: 'Refresh web view';
icon: BrGlamorousVectorIcons refresh; icon: BrGlamorousVectorIcons refresh;
action: [ :aButton | action: [ :aButton |
self page asMarkdeep exportAsFileOn: (self page storage / self page markdownFileName). self page asMarkdeep exportAsFileOn: (self page storage / self page markdeepFileName).
aButton phlow spawnObject: self page localHostAddress ]. aButton phlow spawnObject: self page localHostAddress ].
self toolbarElement addItem: newButton. self toolbarElement addItem: newButton.
] ]

View File

@ -30,11 +30,13 @@ MiniDocsServer >> addStorage: anObject [
MiniDocsServer >> initStorageRoutes [ MiniDocsServer >> initStorageRoutes [
super initTeapot. super initTeapot.
self storage: FileLocator documents / 'lepiter' / 'default'. self storage: FileLocator documents / 'lepiter' / 'default'.
self teapot
serveStatic: '/lepiter/doc' from: self storage fullName.
] ]
{ #category : #accessing } { #category : #accessing }
MiniDocsServer >> start [ MiniDocsServer >> start [
self initTeapot. self initStorageRoutes.
super start. super start.
] ]