Dynamic routes setup.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-05 12:52:37 -05:00
parent 79b2877154
commit a88af11245
2 changed files with 3 additions and 0 deletions

View File

@ -129,6 +129,7 @@ LePage >> latestEditTime: aLeTime [
{ #category : #'*MiniDocs' }
LePage >> localHostAddress [
| localUrl route |
MiniDocsServer teapot server isRunning ifFalse: [ MiniDocsServer start ].
route := MiniDocsServer teapot staticRouter prefix joinUsing: '/'.
localUrl := MiniDocsServer teapot server localUrl asString.
^ localUrl, route, '/', self markdeepFileName

View File

@ -45,6 +45,8 @@ MiniDocsServer >> initRoutes [
self storage: FileLocator documents / 'lepiter' / 'default'.
self teapot
serveStatic: '/lepiter/doc' from: self storage fullName.
self teapot
GET: '/lepiter' -> 'A list of Mardeep exported Lepiter docs will appear soon...'
]
{ #category : #accessing }