move backend code to server/ folder