Boilerplate HTTP Server for Synopse mORMot Framework
This project is embedding of HTML5 Boilerplate v.5.3.0 apache server settings into Synopse mORMot Framework
- Download and unpack the lattest mORMotBP release from GitHub Dist directory
- Add the next three project Pre-Build events (to embed all h5bp assets as application resource file ):
Tools\assetslz.exe Assets Assets.synlz
Tools\resedit.exe $(INPUTNAME).res rcdata ASSETS Assets.synlz
DEL Assets.synlz
- Add
BoilerplateAssets.pas
andBoilerplateHTTPServer.pas
files into your project - Replace your
TSQLHttpServer
instance creation withTBoilerplateHTTPServer
- Add assets decompression by calling
YourHTTPServerInstance.LoadFromResource('Assets');
- Embed all your mORMot project assets as resource into application file as highly compressed synlz archive
- Allows to build single file distributions (fully aligned with Instant Deployment approach)
- Save your cloud hosting Disk IO operations by return all static assets from mem-cached repository
- Fully aligned with HTML5 Boilerplate Apache Server configs with more than 35+ options and properties
- Server side
ETag/Last-Modified
or more user-friendlyLast-Modified/If-Modified-Since
cache strategies - Browsed side
Expires
orCache-Control: max-age
cache strategies - Pre-compressed GZip variants of all assets, up to maximum level 9 compression
- You can embed
.map
or even better.mab
files into application for better exception stack tracing - Apply all HTTP headers corrections following HTML5 Boilerplate apache settings
- Delegate all static assets tranferring to low-level API (e.g.
http.sys
) even GZipped content!
The TBoilerplateHTTPServer
is fully test covered with mORMot Test Suite framework. Instead of classical TDD approach more modern Behaviour Driven Development (BDD) scenarios are used. Please see Tests\mORMotBPTests.dpr
test project.
The code is available under the MIT license.
Fill free to contact me at @gmail.com: eugene.ilyin