summaryrefslogtreecommitdiff
path: root/src/strusCms.cpp
blob: 64cc235ad5c8a3ff1f00c63fa31364a26b83bbc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "strusCms.hpp"

#include <cppcms/url_mapper.h>   
#include <cppcms/http_response.h>
#include <cppcms/json.h>

namespace apps {

strusCms::strusCms( cppcms::service &srv )
	: cppcms::application( srv ),
	intro( *this )
{
	locale_name = "en";
	script = settings( ).get<std::string>( "strusCms.script" );

	add( intro );

	mapper( ).root( "/strusCms" );
}

std::string strusCms::root( std::string l )
{
	if( l.empty( ) ) l = locale_name;
	return script + "/" + l;
}

}