Main  /  Edit  /  History  /   /  Users Area

CppCMS Utilities

In addition to library, CppCMS provides several utilities that are used for building, running and configuring applications:

cppcms_tmpl_cc -- templates compiler


cppcms_tmpl_cc [-o filename.cpp] [-n namespace] [-d domain] file1.tmpl ...


For example:

cppcms_tmpl_cc -o view.cpp main.tmpl page.tmpl article.tmpl 


cppcms_make_key create private key for configuration

This script uses /dev/random to create such key. You just can copy-paste it's output to the configuration file.

You may use any other tool that create cryptographically safe random set of 32 hexadecimal digits.

cppcms_tcp_scale --- scalability server

It that provides distributed backends for cache and session storage.

Usage: cppcms_tcp_scale [parameters]


Note: At least one of --session-files, --session-sqlite3, --cache should be defined.

For example:

cppcms_tcp_scale --port 3101 --cache --limit 10000 

Start cache server with one thread on port 3101 with top limit of number of entries 10,000.

Performance notes:

cppcms_run --- running application

This utility allows you run and debug cppcms based applications.

You need to install one of the following web servers:

  1. Lighttpd
  2. Nginx
  3. Apache2 with mod_fastcgi

You need to define a unix domain socket in your configuration file, for example: server.socket="/tmp/app.sock"

If you use nginx or apache, you should define server.api="fastcgi". If you use have lighttpd, you may choose "scgi" as well.


Usage cppcms_run [-e] [ -S server ] [-p port] [-h host] \
                 [-r /document/root ] [-s /script ]
                 program -c config.txt [ additional parameters ]


For example:

cppcms_run hello -c config.txt

Would start a server at and the application will be accessable from "/hello" path at server.

If you do not specify webserver, cppcms_run first will try to locate ligttpd, then nginx -- asynchronous lightweight servers and then it would try to locate apache2 to run it.

Switch -e is very useful for debugging. For example:

$ cppcms_run -e app -c config.txt
Server started
$ gdb app
> r -c config.txt
Access violation 
> backtrace

This is simple example of running application with gdb, however you can run it with any debugger or IDE. For example, most of cppcms was written and debugged in KDevelop.


CppCMS is a web development framework for performance demanding applications.

Support This Project Logo

Поддержать проект

CppCMS needs You


Main Page

Valid CSS | Valid XHTML 1.0