1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/FastAPI_ynh.git synced 2024-09-03 18:36:00 +02:00

Merge pull request #10 from YunoHost-Apps/testing

Testing
This commit is contained in:
Alexandre Aubin 2024-04-07 17:53:28 +02:00 committed by GitHub
commit b100b26b77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 4 deletions

View file

@ -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)

View file

@ -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.*

45
README_eu.md Normal file
View file

@ -0,0 +1,45 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# 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: <https://github.com/leonarf/FastAPI_ynh>
- YunoHost Denda: <https://apps.yunohost.org/app/fastapi>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/fastapi_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

View file

@ -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():