import urllib.request import json # 1. Check if backend is running try: req = urllib.request.Request('http://localhost:37821/api/projects') resp = urllib.request.urlopen(req, timeout=3) projects = json.loads(resp.read().decode()) print('Backend is running!') print('Projects:', len(projects)) for p in projects: print(' id={} name={} coverImage={}'.format(p['id'], p['name'], p['coverImage'])) except Exception as e: print('Backend NOT running or error:', e) # 2. Check if uploads directory exists import os uploads_dir = 'D:/Idea Project/publish/uploads' if os.path.exists(uploads_dir): print('Uploads dir exists:', uploads_dir) for root, dirs, files in os.walk(uploads_dir): for f in files: fpath = os.path.join(root, f) print(' File:', fpath) else: print('Uploads dir NOT found:', uploads_dir)