FrugalSOT / app.py
HARISH20205's picture
Initial
20b3d84
raw
history blame contribute delete
382 Bytes
import subprocess
import os
# Define the port and Node.js command
port = os.getenv("PORT", 7860) # Default to 7860 if PORT is not set
node_command = ["node", "server.js"]
# Start the Node.js application
try:
print(f"Starting Node.js server on port {port}...")
subprocess.run(node_command, check=True)
except Exception as e:
print(f"Error running Node.js server: {e}")