Problem is related to Toasty lib which requires document DOM to be ready when it is loaded.
So you need to lazy load them using defer keyword:
Please remove custom files from ServerModule and add these lines to Main.pas:
initialization
RegisterAppFormClass(TMainForm);
UniAddCSSLibrary('toasty/toasty.css', False, [upoFolderFiles, upoPlatformBoth]);
UniAddJSLibrary('toasty/toasty.js', False, [upoFolderFiles, upoPlatformBoth, upoDefer]);
end.