MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / start_frontend

Function start_frontend

botasaurus_server/botasaurus_server/run.py:66–75  ·  view source on GitHub ↗
(is_dev)

Source from the content-addressed store, hash-verified

64 print("Starting frontend server at http://localhost:3000/")
65
66def start_frontend(is_dev):
67 frontend_dir = os.path.join(os.getcwd(), "frontend")
68 cmd = "npm run dev" if is_dev else "npm run start"
69 result = subprocess.run(cmd, shell=True,
70 stdout = None if is_dev else subprocess.DEVNULL, # Suppress the standard output
71 stderr= None if is_dev else subprocess.PIPE, # Capture the standard error
72 check=True,
73 cwd=frontend_dir # Return outputs as strings
74)
75 return result
76
77def run_frontend(is_dev):
78 try:

Callers 1

run_frontendFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected