refactor(server) main -> require