Re: [Cppcms-users] non-greedy moint points
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-07-15 10:19:40
|
You can use nagative look-around http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word Something like that cppcms::mount_point("/webapi(/(.*))", 1) cppcms::mount_point("^(?!/webapi)(/(.*))", 1) Not sure about exact syntax but the general idea should be clear, the second mount point should match all but /webapi Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Marcel Hellwig <ke...@co...> >To: cpp...@li... >Sent: Monday, July 15, 2013 1:16 AM >Subject: [Cppcms-users] non-greedy moint points > > >Hi everybody, > >now my seconds problem :/ >I have a json rpc server running a async app via an intrusive ptr. >Also I'd like to have a sync app that will serve my "static" HTML-pages. > >The current setup is > >> booster::intrusive_ptr<WebAPI> bgworker(new WebAPI(srv)); >> >> srv.applications_pool().mount(bgworker, >> cppcms::mount_point("/webapi(/(.*))", 1)); >> srv.applications_pool().mount(cppcms::applications_factory<Dispatcher>(), >> cppcms::mount_point("/index(/(.*))", 1)); >But this is not what I want. I want to provide all rpc calls under the >webapi domain and everything else under /, so nothing more. >Now I have to write /index/edit, instead of /edit -> that's annoying. > >Any help? > > >------------------------------------------------------------------------------ >See everything from the browser to the database with AppDynamics >Get end-to-end visibility with application monitoring from AppDynamics >Isolate bottlenecks and diagnose root cause in seconds. >Start your free trial of AppDynamics Pro today! >http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |