import yaml
import os


class AppConfig():
    def __init__(self, path=os.path.join(os.path.dirname(__file__), '..', 'server.yaml')):
        self._data = yaml.load(open(path, 'rb').read())

    def get_http_port(self):
        return self._data['http_port']

    def get_push_port(self):
        return self._data['push_port']

    def get_pull_port(self):
        return self._data['pull_port']


instance = AppConfig()
