modularized api server into routes