Skip to content

Commit

Permalink
Revert certain changes. Otherwise upgrade tqdme
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed May 23, 2024
1 parent 7248a43 commit d9d7ce1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
5 changes: 2 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ dependencies:
- pip=23.2.1
- python=3.12.3
- pip:
- gevent==24.2.1
- gevent-websocket==0.10.1
- eventlet==0.36.1
- gunicorn==22.0.0
- tqdme[server]==0.0.1
- tqdme[server]==0.0.2
- pyinstaller==6.0.0
prefix: /opt/anaconda3/envs/tqdm.me
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"src/**"
],
"scripts": {
"start": "python src/server.py",
"start": "commoners --target desktop",
"dev": "commoners",
"services": "commoners share",
"service:node": "commoners share --service localNode",
Expand Down
6 changes: 1 addition & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ eventlet==0.36.1
Flask==3.0.3
Flask-Cors==4.0.1
Flask-SocketIO==5.3.6
gevent==24.2.1
gevent-websocket==0.10.1
greenlet==3.0.3
gunicorn==22.0.0
h11==0.14.0
Expand All @@ -28,10 +26,8 @@ requests==2.32.2
setuptools==69.5.1
simple-websocket==1.0.0
tqdm==4.66.4
tqdme==0.0.1
tqdme==0.0.2
urllib3==2.2.1
Werkzeug==3.0.3
wheel==0.43.0
wsproto==1.2.0
zope.event==5.0
zope.interface==6.4.post0
8 changes: 6 additions & 2 deletions src/frontend/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ main {
}

main > * {
flex-grow: 1;
height: 100%;
display: flex;
flex-wrap: wrap;
gap: 25px;
height: fit-content;
/* flex-grow: 1;
height: 100%; */
}

a {
Expand Down
11 changes: 2 additions & 9 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
from pathlib import Path
from flask import send_from_directory
from tqdme.server import Server
from gevent.pywsgi import WSGIServer


script_directory = Path(__file__).parent.resolve()

PORT = int(os.environ.get("PORT", 3768)) # Use 8080 if run standalone locally
PORT = int(os.environ.get("PORT", 8080)) # Use 8080 if run standalone locally
HOST = os.getenv('HOST') or 'localhost'


def start_production_server(host, port, app):
http_server = WSGIServer((host, port), app)
http_server.serve_forever()


def create_server():

Expand All @@ -35,7 +28,7 @@ def get_static_assets(path):
if __name__ == "__main__":

server = create_server()
start_production_server(HOST, PORT, server.app)
server.run()

# Using gunicorn
else:
Expand Down

0 comments on commit d9d7ce1

Please sign in to comment.