1. Minor fix in the stopServer function.
2. Adding event registration mechanisms for post and get.