[Cppcms-users] URL maps
Brought to you by:
artyom-beilis
From: Renato F. <re....@ay...> - 2011-03-25 13:16:14
|
Hi, I am try understand how group and map url. For sample I have 2 classes: class Home : public cppcms::application class Test : public cppcms::application And a class that I can group apps: class App : public cppcms::application { public: Home _home; Test _test; App(cppcms::service &s) : cppcms::application(s) , _home(s) , _test(s) { add(_test, "/test", 1); add(_home, "/home", 2); } }; int main(int argc,char ** argv) { try { cppcms::service srv(argc, argv); srv.applications_pool().mount(cppcms::applications_factory<App>()); srv.run(); } catch(std::exception const &e) { std::cerr<<e.what()<<std::endl; } } But when I'd tried access like: http://localhost:8080/test or http://localhost:8080/home Don't work, What is wrong? My config file: { "service" : { "api" : "http", "port" : 8080, "worker_threads" : 20, }, "http" : { "script" : "/" }, "file_server" : { "enable" : true }, "session" : { "expire" : "renew", "timeout" : 604800, "location" : "client", "client" : { "encryptor" : "hmac", "key" : "232074faa0fd37de20858bf8cd0a7d04" } }, } Thaks |