https://github.com/zodddev/fastapi-template
https://github.com/zodddev/fastapi-template
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zodddev/fastapi-template
- Owner: zoddDev
- Created: 2021-12-01T12:38:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-10T13:04:09.000Z (about 4 years ago)
- Last Synced: 2025-02-01T08:47:57.240Z (about 1 year ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tecnologías usadas
## Backend
(Directorio `backend`)
#### Framework
Se ha utilizado el framework FastAPI (Python 3) para la API REST.
#### Base de datos
En cuanto a la base de datos, se ha utilizado MongoDB (credenciales disponibles en `./backend/config/db.py`)
## Frontend
(Directorio `frontend`)
#### Cliente REST
Se han utilizado HTML5 y el framework Vue.js (JavaScript) para el cliente REST (directorio `./frontend/rest_client`).
#### Cliente AJAX
Se han utilizado HTML5 y AJAX para el cliente AJAX (directorio `./frontend/ajax_client`).
#### Cliente Textual
Se han utilizado python3 para el cliente Textual (directorio `./frontend/text_client`).
# Manual de usuario
## Instalación del backend
- Descargar e instalar [python3](https://www.python.org/downloads/) .
- Ejecutar el fichero `./backend/install.bat`
- Alternativamente ejecutar:
```
pip3 install -r ./backend/requirements.txt
```
## Ejecución
#### API REST
- Ejecutar el fichero `./backend/run.bat`
- Alternativamente y estando dentro del directorio `./backend` ejecutar:
```
uvicorn run:app --reload
```
- El servidor se abrirá en `http://localhost:8000`
#### Cliente REST
- Abrir el fichero `./frontend/rest_client/index.html` en un navegador de preferencia (p. ej. [Firefox](https://www.mozilla.org/es-ES/firefox/new/)).
#### Cliente AJAX
- Abrir el fichero `./frontend/ajax_client/index.html` en un navegador de preferencia (p. ej. [Firefox](https://www.mozilla.org/es-ES/firefox/new/)).
#### Cliente Textual
- Ejecutar el fichero `./frontend/text_client/main.py` utilizando el comando `python3 ./frontend/text_client/main.py`.
## Documentación
La documentación de la API REST viene definida en la misma API haciendo uso de OpenAPI, concretamente en `http://localhost:8000/docs` .