Updated server to use router instead of routes.