Skip to content

Commit 4d1ff84

Browse files
committed
README: fix commands to run the new web service
1 parent e2887aa commit 4d1ff84

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,28 @@ To run the ArduPilot Custom Firmware Builder locally without Docker, ensure you
105105
```
106106

107107
5. **Execute the Application:**
108-
- For a development environment, run:
108+
- For a development environment with auto-reload, run:
109109
```bash
110-
./web/app.py
110+
python3 web/main.py
111+
```
112+
To change the port, use the `--port` argument:
113+
```bash
114+
python3 web/main.py --port 9000
111115
```
112116
- For a production environment, use:
113117
```bash
114-
gunicorn web.wsgi:application
118+
uvicorn web.main:app --host 0.0.0.0 --port 8080
115119
```
116120

117-
During the coding and testing phases, use the development environment to easily debug and make changes. When deploying the app for end users, use the production environment to ensure better performance, scalability, and security.
121+
During the coding and testing phases, use the development environment to easily debug and make changes with auto-reload enabled. When deploying the app for end users, use the production environment to ensure better performance, scalability, and security.
118122

119-
The application will automatically set up the required base directory at `./base` upon first execution. You may customize this path by using the `--basedir` option with the above commands or by setting the `CBS_BASEDIR` environment variable.
123+
The application will automatically set up the required base directory at `./base` upon first execution. You may customize this path by setting the `CBS_BASEDIR` environment variable.
120124

121125
6. **Access the Web Interface:**
122126

123-
Once the application is running, you can access the interface in your web browser at http://localhost:5000 if running directly using app.py (development environment), or at http://localhost:8000 if using Gunicorn (production environment).
127+
Once the application is running, you can access the interface in your web browser at http://localhost:8080.
124128

125-
To change the default port when running with app.py, modify the `app.run()` call in web/app.py file by passing `port=<expected-port>` as an argument. For Gunicorn, refer to the [commonly used arguments](https://docs.gunicorn.org/en/latest/run.html#commonly-used-arguments) section of the Gunicorn documentation to specify a different port.
129+
The default port is 8080, or the value of the `WEB_PORT` environment variable if set. You can override this by passing the `--port` argument when running the application directly (e.g., `python3 web/main.py --port 9000`) or when using uvicorn (e.g., `uvicorn web.main:app --port 5000`). Refer to the [uvicorn documentation](https://www.uvicorn.org/) for additional configuration options.
126130

127131
## Directory Structure
128132
The default directory structure is established as follows:

0 commit comments

Comments
 (0)