Skip to content

Commit

Permalink
Add waitress as alternative command for gunicorn in Windows (#431)
Browse files Browse the repository at this point in the history
* Add waitress as alternative command for gunicorn in Windows

* Update secrets

* Update gunicorn windows warning in other places
  • Loading branch information
kumaranvpl authored Oct 18, 2024
1 parent dd5c265 commit 85dc3e4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"filename": "docs/docs/en/getting-started/index.md",
"hashed_secret": "3be2e9dd1980856faddf5bd205e3ff96b24776aa",
"is_verified": false,
"line_number": 431,
"line_number": 445,
"is_secret": false
}
],
Expand Down Expand Up @@ -194,5 +194,5 @@
}
]
},
"generated_at": "2024-10-17T12:43:16Z"
"generated_at": "2024-10-18T09:09:00Z"
}
21 changes: 21 additions & 0 deletions docs/docs/en/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,13 @@ Once everything is set up, you can run your FastAgency application using the fol
gunicorn main:app
```

!!! danger "Currently not working on **Windows**"
The above command is currently not working on **Windows**, because gunicorn is not supported. Please use the alternative method below to start the application:
```
pip install waitress
waitress-serve --listen=0.0.0.0:8000 main:app
```

=== "FastAPI + Mesop"

In this setup, we need to run **two** commands in **separate** terminal windows:
Expand All @@ -421,6 +428,13 @@ Once everything is set up, you can run your FastAgency application using the fol
gunicorn main_2_mesop:app -b 0.0.0.0:8888 --reload
```

!!! danger "Currently not working on **Windows**"
The above command is currently not working on **Windows**, because gunicorn is not supported. Please use the alternative method below to start the application:
```
pip install waitress
waitress-serve --listen=0.0.0.0:8888 main_2_mesop:app
```

=== "NATS + FastAPI + Mesop"

In this setup, we need to run **four** commands in **separate** terminal windows:
Expand Down Expand Up @@ -449,6 +463,13 @@ Once everything is set up, you can run your FastAgency application using the fol
gunicorn main_3_mesop:app -b 0.0.0.0:8888 --reload
```

!!! danger "Currently not working on **Windows**"
The above command is currently not working on **Windows**, because gunicorn is not supported. Please use the alternative method below to start the application:
```
pip install waitress
waitress-serve --listen=0.0.0.0:8888 main_3_mesop:app
```

### Output

The outputs will vary based on the interface, here is the output of the last terminal starting UI:
Expand Down
7 changes: 7 additions & 0 deletions docs/docs/en/tutorial/giphy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ There are two options of running a Mesop application:
gunicorn main:app
```

!!! danger "Currently not working on **Windows**"
The above command is currently not working on **Windows**, because gunicorn is not supported. Please use the alternative method below to start the application:
```
pip install waitress
waitress-serve --listen=0.0.0.0:8000 main:app
```

```console
╭─ Python package file structure ──╮
│ │
Expand Down
7 changes: 7 additions & 0 deletions docs/docs/en/user-guide/ui/mesop/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ There are two options of running a Mesop application:
gunicorn main:app
```

!!! danger "Currently not working on **Windows**"
The above command is currently not working on **Windows**, because gunicorn is not supported. Please use the alternative method below to start the application:
```
pip install waitress
waitress-serve --listen=0.0.0.0:8000 main:app
```

---

!!! note
Expand Down

0 comments on commit 85dc3e4

Please sign in to comment.