You are not logged in.
Pages: 1
Hi,
In framework documentation said:
In order to have the BLOG content hosted in root/blog URI, you should specify the expected sub-URI when initializing your TMVCApplication:
procedure TBlogApplication.Start(aServer: TSQLRestServer); begin ... fMainRunner := TMVCRunOnRestServer.Create(self,nil,'blog'). ...
,but in sample "30 - MVC Server" there is no sub-URI definition of the hosted MVC and it works:
...
fMainRunner := TMVCRunOnRestServer.Create(Self).
...
How it works and is it possible to use root (/) instead of root/blog (/blog)?
Thanks
Alexandre
Offline
It seems that the MVC URI defined in TSQLModel and not in TMVCRunOnRestServer as documentation said:
result := TSQLModel.Create([TSQLBookInfo,TSQLAuthor,
TSQLTag,TSQLArticle,TSQLComment,TSQLArticleSearch],'blog');
And it seems I can't use a host's root as MVC root, cause TSQLModel will replace an empty URI string with 'root'. (I'm confused with using 'root', cause usually root means '/' and not '/root')
Did I missed something, but why MVC root URI was defined in TSQLModel?
Thanks,
Alexandre
Offline
Pages: 1