Skip to content

Commit 7b14781

Browse files
authored
Merge pull request #18 from digitalex/docs-run-instructions
Add instructions for running the web UI
2 parents fa05120 + 39c84ca commit 7b14781

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,56 @@ LOGFIRE_TOKEN=<my new token>
4141

4242
1. Run `python demo.py`.
4343
2. 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.
4494
3. Try some more, e.g. `python demo.py microblog`, or `python demo.py snake`.
4595
4. Tell all your friends.
4696

start_app.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

0 commit comments

Comments
 (0)