not really; I think you are thinking about this wrong.
If you want your application to do different things when it hits the main function, just add a when to your main and do some routing based on what the url looks like. Or just use the fritz2 routing ... that's what it's for.
Fritz2 is a of course a SPA framework, so using it with a server sider rendering app is not the most logical thing to do.