Setting up the chat client functionality using SocketIO - Start
This commit is contained in:
14
scripts/run_eveai_chat.py
Normal file
14
scripts/run_eveai_chat.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from eveai_chat import create_app
|
||||
from gevent.pywsgi import WSGIServer
|
||||
from geventwebsocket.handler import WebSocketHandler
|
||||
|
||||
|
||||
app = create_app()
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("Server starting on port 5001")
|
||||
http_server = WSGIServer(('0.0.0.0', 5001), app, handler_class=WebSocketHandler)
|
||||
http_server.serve_forever() # Continuously listens for incoming requests
|
||||
|
||||
|
||||
|
||||
15
scripts/start_eveai_chat.sh
Executable file
15
scripts/start_eveai_chat.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/" || exit 1
|
||||
source "/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/.venv/bin/activate"
|
||||
|
||||
export PYTHONPATH="$PYTHONPATH:/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/"
|
||||
|
||||
# Set flask environment variables
|
||||
export FLASK_ENV=development # Use 'production' as appropriate
|
||||
export FLASK_DEBUG=1 # Use 0 for production
|
||||
|
||||
# Start Flask app
|
||||
python scripts/run_eveai_chat.py
|
||||
|
||||
deactivate
|
||||
Reference in New Issue
Block a user