set up routing and templating