Running in production
The following setting and practices should be used when running Blog-Core sites in production environment.
Enable production mode
The production mode enables various caching mechanisms. It is enabled by setting the
PL_ENV environment prior running the SWI-Prolog
PL_ENV=production swipl -s main.pl
Make load-time errors fatal
This guarantees that the site is not loading up with bad code. See the guide.
Use with Nginx
Nginx will help to save resources when serving static files. See the guide. Additionally, compression for text-based static files (CSS/JS) should be enabled.
Logging to stderr
If you use a process manager such as Systemd, you can enable HTTP error logging into stderr. This is helpful for logging and monitoring possible errors (failing and throwing handlers) in the site's codebase.