File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,56 @@ LOGFIRE_TOKEN=<my new token>
4141
42421 . Run ` python demo.py ` .
43432 . Say 'wow!'
44+
45+ ## Running the Web UI
46+
47+ To run the web UI, you'll need to start both the backend server and the frontend development server.
48+
49+ ### Backend Setup
50+
51+ 1 . ** Install dependencies:**
52+ ``` bash
53+ pip install -r requirements.txt
54+ ```
55+
56+ 2 . ** Run the server:**
57+ ``` bash
58+ python server.py
59+ ```
60+ The backend server will be running on ` http://localhost:8000 ` .
61+
62+ ### Frontend Setup
63+
64+ 1 . ** Navigate to the frontend directory:**
65+ ``` bash
66+ cd frontend
67+ ```
68+
69+ 2 . ** Install dependencies:**
70+ ``` bash
71+ npm install
72+ ```
73+
74+ 3 . ** Run the development server:**
75+ ``` bash
76+ npm run dev
77+ ```
78+ The frontend development server will be running on ` http://localhost:5173 ` .
79+
80+ ### Using the Convenience Script
81+
82+ A convenience script ` start_app.sh ` is provided to start both the backend and frontend servers with a single command.
83+
84+ 1 . ** Make the script executable:**
85+ ``` bash
86+ chmod +x start_app.sh
87+ ```
88+
89+ 2 . ** Run the script:**
90+ ``` bash
91+ ./start_app.sh
92+ ```
93+ This will start the backend server in the background and then start the frontend development server in the foreground.
44943 . Try some more, e.g. ` python demo.py microblog ` , or ` python demo.py snake ` .
45954 . Tell all your friends.
4696
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ echo " Starting backend server..."
3+ python server.py > backend.log 2>&1 &
4+ echo " Backend server started in the background. Logs are in backend.log"
5+
6+ echo " Starting frontend development server..."
7+ cd frontend
8+ npm run dev
You can’t perform that action at this time.
0 commit comments