Skip to content

Commit

Permalink
fix: port 5001
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Apr 7, 2022
1 parent d0fd35d commit dac3952
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ However, Python applications can be frozen with [PyInstaller](https://www.pyinst

The whole workflow consists of freezing backend and frontend separately. This is because there have been enormous problems with the packaging of [PyQt5](https://www.riverbankcomputing.com/software/pyqt/) (the Python-based frontend), and we are using a JavaScript-based frontend, [Electron](https://electronjs.org/), instead. To run Topics Explorer from source code, we still use PyQt5 because it works pretty well and we stick with one programming language.

The backend is a [Flask](http://flask.pocoo.org/) application that is started with the script `topicsexplorer.py` and the parameter `--frozen` (or in the actually frozen application also without this parameter). The home page will be available at `http://localhost:5000`.
The backend is a [Flask](http://flask.pocoo.org/) application that is started with the script `topicsexplorer.py` and the parameter `--frozen` (or in the actually frozen application also without this parameter). The home page will be available at `http://localhost:5001`.

It is recommended to install the current [`develop`](https://github.com/pyinstaller/pyinstaller/tree/develop) branch from PyInstaller on GitHub. If you encounter problems, you should try different versions of the application’s dependencies.

Expand Down Expand Up @@ -155,7 +155,7 @@ This is _really_ easy. Checkout the `freeze-frontend` branch and follow the inst


### Putting it all together
You now have a `topics-explorer-backend` folder containing the frozen Flask application in the form of an executable with all other resources, and a `topics-explorer-frontend` folder containing an executable with all resources. You could already deploy the application now, since you start the backend first, then the frontend. The `convenience-wrapper` branch contains a script that does just that for you. It starts a subprocess to start the backend, waits until `http://localhost:5000` is available, and then starts the frontend.
You now have a `topics-explorer-backend` folder containing the frozen Flask application in the form of an executable with all other resources, and a `topics-explorer-frontend` folder containing an executable with all resources. You could already deploy the application now, since you start the backend first, then the frontend. The `convenience-wrapper` branch contains a script that does just that for you. It starts a subprocess to start the backend, waits until `http://localhost:5001` is available, and then starts the frontend.

Checkout the branch `convenience-wrapper`, and follow the instructions in the README. If your frozen application adheres to the following structure and everything works, congratulations, zip it and release it:

Expand Down
4 changes: 2 additions & 2 deletions application.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@


if __name__ == "__main__":
webbrowser.open("http://localhost:5000/")
views.web.run()
webbrowser.open("http://localhost:5001/")
views.web.run(port=5001)
Binary file removed topicsexplorer/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed topicsexplorer/__pycache__/__main__.cpython-38.pyc
Binary file not shown.
Binary file removed topicsexplorer/__pycache__/database.cpython-38.pyc
Binary file not shown.
Binary file removed topicsexplorer/__pycache__/utils.cpython-38.pyc
Binary file not shown.
Binary file removed topicsexplorer/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file removed topicsexplorer/__pycache__/workflow.cpython-38.pyc
Binary file not shown.

0 comments on commit dac3952

Please sign in to comment.