noones-search/searx
Markus Heiser e9157b3c1a [fix] issues when launching a local development server
A local development server can be launched by one of these command lines::

    $ flask --app searx.webapp run
    $ python -m searx.webapp

The different ways of starting the server should lead to the same result, which
is generally the case.  However, if the modules are reloaded after code
changes (reload option), it must be avoided that the application is initialized
twice at startup.  We have already discussed this in 2022 [1][2].

Further information on this topic can be found in [3][4][5].

To test a bash in the ./local environment was started and the follwing commands
had been executed::

    $ ./manage pyenv.cmd bash --norc --noprofile
    (py3) SEARXNG_DEBUG=1 flask --app searx.webapp run --reload
    (py3) SEARXNG_DEBUG=1 python -m searx.webapp

Since the generic parts of the docs also initialize the app to generate doc from
it, the build of the docs was also tested::

    $ make docs.clean docs.live

[1] https://github.com/searxng/searxng/pull/1656#issuecomment-1214198941
[2] https://github.com/searxng/searxng/pull/1616#issuecomment-1206137468
[3] https://flask.palletsprojects.com/en/stable/api/#flask.Flask.run
[4] https://github.com/pallets/flask/issues/5307#issuecomment-1774646119
[5] https://stackoverflow.com/a/25504196

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-22 14:26:11 +02:00
..
answerers [fix] gettext can't work with f-strings (i10n) 2025-01-29 06:04:09 +01:00
botdetection [fix] plugins: bugfix of tor_check and unit_converter 2025-03-15 10:36:33 +01:00
data [fix] engine radio browser: get servers from DNS api.radio-browser.info 2025-04-06 18:59:10 +02:00
enginelib [fix] make data.traits - partial revert of commit 30a8204 2025-03-22 07:52:36 +01:00
engines [feat] engine: add Steam engine 2025-04-18 09:30:17 +02:00
favicons [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
infopage [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
metrics [fix] openmetrics: value is None if there's no data 2024-11-25 16:57:03 +01:00
network [fix] issues when launching a local development server 2025-04-22 14:26:11 +02:00
plugins [refactor] migrate plugins from "module" to class SXNGPlugin 2025-03-29 10:16:43 +01:00
result_types [fix] Result type: remove rstrip "/" form url normalization 2025-04-17 10:24:05 +02:00
search [fix] issues when launching a local development server 2025-04-22 14:26:11 +02:00
static/themes/simple [build] /static 2025-04-06 19:21:07 +02:00
templates/simple [mod] migrate all key-value.html templates to KeyValue type 2025-03-15 10:36:33 +01:00
translations [l10n] update translations from Weblate 2025-04-18 09:30:55 +02:00
__init__.py [fix] issues when launching a local development server 2025-04-22 14:26:11 +02:00
autocomplete.py [feat] add Quark autocomplete support 2025-03-31 14:59:49 +02:00
babel_extract.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
compat.py [mod] Revision of the favicon solution 2024-10-05 08:18:28 +02:00
exceptions.py [fix] engine: duckduckgo - CAPTCHA detection 2024-10-19 14:55:44 +02:00
extended_types.py [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
external_bang.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
external_urls.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
flaskfix.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
limiter.py [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
limiter.toml [chore] *: fix typos detected by typos-cli 2024-11-24 12:41:57 +01:00
locales.py [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
openmetrics.py [fix] openmetrics: value is None if there's no data 2024-11-25 16:57:03 +01:00
preferences.py [refactor] migrate plugins from "module" to class SXNGPlugin 2025-03-29 10:16:43 +01:00
query.py [refactor] unit tests to utilize paramaterized and break down monolithic tests 2024-10-03 13:20:32 +02:00
redisdb.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
redislib.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
results.py [refactor] typification of SearXNG (MainResult) / result items (part 2) 2025-03-15 10:36:33 +01:00
searxng.msg Revert "[l10n ga] trigger weblate.push.translations (another try)" 2025-01-06 17:12:16 +01:00
settings.yml [feat] engine: add Steam engine 2025-04-18 09:30:17 +02:00
settings_defaults.py [refactor] migrate plugins from "module" to class SXNGPlugin 2025-03-29 10:16:43 +01:00
settings_loader.py [mod] revision of the settings_loader 2024-07-14 18:10:06 +02:00
sqlitedb.py [mod] sqlitedb: access to SQLite databases a little more convenient. 2024-10-05 08:18:28 +02:00
sxng_locales.py [fix] make data.traits - partial revert of commit 30a8204 2025-03-22 07:52:36 +01:00
unixthreadname.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
utils.py [fix] hardening against arguments of type None, where str or dict is expected 2025-04-01 11:13:47 +02:00
version.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
webadapter.py [chore] *: fix typos detected by typos-cli 2024-11-24 12:41:57 +01:00
webapp.py [fix] issues when launching a local development server 2025-04-22 14:26:11 +02:00
webutils.py [fix] issues when launching a local development server 2025-04-22 14:26:11 +02:00