split up server.js into model, config and routes.js