web: added a config file and cleaned up api.php