I have a simple app which has the following architecture:
front-end api/ back-end server.py api/ utils/
The app is already using http based server which is started/configured in the server.py. However, now I would also like to use websockets for some new functionalities, while my old http -based code will still be used throughout the app.
My question is, should I create another, separate server for the websockets? Should I decouple the code from the server.py into two files (http server and websocket server)? What are the pros/cons for each approach and is it possible to use the same server for both, the http requests coming in and the websocket connections?