chore(server): refactory server.js