saveweb-search-backend/README.md

32 lines
738 B
Markdown
Raw Permalink Normal View History

2024-02-18 07:33:21 -08:00
# saveweb-search-backend
## Installation
```bash
pip install -r requirements.txt
```
## Setup environment variables
```bash
2024-02-18 07:42:13 -08:00
MEILI_URL # MeiliSearch host.
# default: "http://localhost:7700"
2024-02-18 07:33:21 -08:00
MEILI_KEY # MeiliSearch API key.
# default: '' (empty string)
2024-02-18 07:42:13 -08:00
2024-02-18 07:33:21 -08:00
STWP_SEARCH_MAX_LOAD # If the load is higher than this, API will return 503.
# default: cpu_count / 1.5
STWP_SEARCH_MAX_FLYING_OPS # If the number of flying requests is higher than this, API will return 503.
# default: $STWP_SEARCH_MAX_LOAD * 2 (min value: 1)
STWP_SEARCH_CORS # CORS Allow-Origin header, split by `,`
# default: *
```
## Run
```bash
python saveweb-search-backend.py
# or
hypercorn --bind '[::]:8077' saveweb-search-backend:app # to customize the bind address
```