Pre dynamic routes setup.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-04 14:25:48 -05:00
parent a587817790
commit 79b2877154

View File

@ -10,9 +10,22 @@ Class {
#category : #MiniDocs #category : #MiniDocs
} }
{ #category : #accessing }
MiniDocsServer class >> build [
TLRESTAPIBuilder buildAPI.
self start
]
{ #category : #accessing }
MiniDocsServer class >> listLepiterDocs: aRequest [
<REST_API: 'GET' pattern: 'lepiter'>
^ 'A list of Mardeep exported Lepiter docs will appear soon...'
]
{ #category : #accessing } { #category : #accessing }
MiniDocsServer class >> restart [ MiniDocsServer class >> restart [
Teapot stopAll. Teapot stopAll.
self build.
^ self start ^ self start
] ]
@ -27,7 +40,7 @@ MiniDocsServer >> addStorage: anObject [
] ]
{ #category : #accessing } { #category : #accessing }
MiniDocsServer >> initStorageRoutes [ MiniDocsServer >> initRoutes [
super initTeapot. super initTeapot.
self storage: FileLocator documents / 'lepiter' / 'default'. self storage: FileLocator documents / 'lepiter' / 'default'.
self teapot self teapot
@ -36,7 +49,7 @@ MiniDocsServer >> initStorageRoutes [
{ #category : #accessing } { #category : #accessing }
MiniDocsServer >> start [ MiniDocsServer >> start [
self initStorageRoutes. self initRoutes.
super start. super start.
] ]