mORMot2
mORMot2 copied to clipboard
New app.http high level wrapper
A new class may be defined to run a stand-alone HTTP(S) server easily.
Including most out-of-the-box nginx features:
- HTTP and HTTPS support with custom certificates or Let's Encrypt service;
- three execution models: Apache (one thread per HTTP/1.1 connection); Async (IOCP or epoll); http.sys (Windows only);
- static content delivery, with optional gzip compression;
- direct pascal code execution at low-level HTTP;
- direct pascal code execution as SOA callbacks;
- redirect to a TRestServer instance (the previous SOA item may be transparently implemented with this);
- HTML server-side rendering using Mustache and our MVC pattern;
- CGI/FastCGI execution #388 ;
- reverse proxy at TCP level #387 ;
- optional IP black list for 4 seconds on status code error, and global CDIR blacklists built-in support;
- customization of the whole workflow using pascal.
The idea is to define the class parameters as high-level methods in pure pascal code, using our efficient router class. Later on, we may see if external settings (using YAML or somewhat compatible nginx format) may also make sense.