diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,6 @@ # All available README files by language - [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) -- [Leggi il “README” in italiano](README_it.md) diff --git a/README.md b/README.md index 440f63a..4deed31 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install FastAPI with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fastapi) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install FastAPI quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..20f231d --- /dev/null +++ b/README_eu.md @@ -0,0 +1,45 @@ + + +# FastAPI YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/fastapi.svg)](https://dash.yunohost.org/appci/app/fastapi) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/fastapi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/fastapi.maintain.svg) + +[![Instalatu FastAPI YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fastapi) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek FastAPI YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +This Application install a FastAPI application "Hello Word" ready to be customized by your own code + +**Paketatutako bertsioa:** 1.0~ynh2 + +## Pantaila-argazkiak + +![FastAPI(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing --debug +edo +sudo yunohost app upgrade fastapi -u https://github.com/YunoHost-Apps/fastapi_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/conf/__init__.py b/conf/__init__.py index 5703e85..855b69c 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -5,8 +5,10 @@ from fastapi import FastAPI UVICORN_ROOT_PATH = os.environ.get('UVICORN_ROOT_PATH') -#app = FastAPI(root_path=UVICORN_ROOT_PATH) -app = FastAPI() +if UVICORN_ROOT_PATH and len(UVICORN_ROOT_PATH) > 0 and UVICORN_ROOT_PATH != '/': + app = FastAPI(root_path=UVICORN_ROOT_PATH) +else: + app = FastAPI() @app.get("/") def read_root():