satwikkansal / python_blockchain_app

A fully functional blockchain application implemented in Python from scratch (with tutorial).
819 stars 471 forks source link

how to run project in a single Port #20

Closed bilalamjad837 closed 4 years ago

bilalamjad837 commented 4 years ago

all is done and work properly but the problem is that in this project we have 2 ports and run separately in two terminals . terminal 1: i) node_server.py 127.0.0.1:8000 terminal 2: ii) run_app.py 127.0.0.1:5000.

i want to run this project in a single port and only one terminal in use. what are the changes of the code to run this project in a single port instead of two different ports.

satwikkansal commented 4 years ago

If you want to use one terminal, you can run the blockchain server in the background.

$ export FLASK_APP=node_server.py
$ flask run --port 8000 &
$ flask run --port 8001 &
and so on...