added server side routing and a basic api