Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help setting this up on webserver. #5

Open
Stacey940 opened this issue Oct 1, 2023 · 1 comment
Open

Help setting this up on webserver. #5

Stacey940 opened this issue Oct 1, 2023 · 1 comment

Comments

@Stacey940
Copy link

Hello,

I am currently attempting to host this on a web server, but I have encountered some difficulties in getting it to work properly. Would it be possible for you to provide an example script or instructions on how to set this up on a web server? I am able to run the application, but I am experiencing issues with WebSocket functionality. Specifically, I am attempting to run this as a Flask application.

Thank you for your assistance.

@sshh12
Copy link
Owner

sshh12 commented Oct 8, 2023

Hey @Stacey940 if you are trying to integrate this into an existing flask server that could be do-able but will require some minor modifications.

I think you could try changing:

class TwilioServer:
    def __init__(self, remote_host: str, port: int, static_dir: str):
        self.app = Flask(__name__)

to something like

class TwilioServer:
    def __init__(self, remote_host: str, port: int, static_dir: str, existing_flask_app):
        self.app = existing_flask_app

# create app in your existing application
TwilioServer(..., existing_flask_app=app)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants