diff --git a/api_app.py b/api_app.py index a672b68..69e9ccf 100644 --- a/api_app.py +++ b/api_app.py @@ -40,7 +40,7 @@ def read_logs(log_folder): item['station_lat'] = config['Settings']['station_lat'] item['station_lon'] = config['Settings']['station_lon'] - return(json_array) + return(json_array) class Packets(Resource): def get(self): @@ -55,4 +55,4 @@ data = read_logs(log_folder) api.add_resource(Packets, '/packets') # and '/locations' is our entry point for Locations if __name__ == '__main__': - api_app.run(debug=True, host='0.0.0.0') # run our Flask app + api_app.run(debug=True, host='0.0.0.0', port=5001) # run our Flask app diff --git a/start_api_waitress.py b/api_waitress.py similarity index 90% rename from start_api_waitress.py rename to api_waitress.py index 2922193..015c602 100644 --- a/start_api_waitress.py +++ b/api_waitress.py @@ -9,4 +9,4 @@ os.chdir(this_files_dir) # `url_prefix` is optional, but useful if you are serving app on a sub-dir # behind a reverse-proxy. -serve(api_app, host='127.0.0.1', port=5000) +serve(api_app, host='127.0.0.1', port=5001) diff --git a/start-aprs_api.sh b/start-aprs_api.sh new file mode 100644 index 0000000..4199c52 --- /dev/null +++ b/start-aprs_api.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# Run `chmod +x start-aprs_api.sh` so this can be run + +screen -dmS aprs_api python3 /home/pi/aprs_tools/api_waitress.py