Added the functionality to api_server module. Start the server by calling api_server:listen(PORT)