Set up to run waitress in screen if needed.
This commit is contained in:
parent
f9547c289e
commit
23d52a80da
|
@ -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
|
||||
|
|
|
@ -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)
|
4
start-aprs_api.sh
Normal file
4
start-aprs_api.sh
Normal file
|
@ -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
|
Loading…
Reference in New Issue
Block a user