mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 16:50:02 +02:00
allways mount frontend files at port 8001
- files were previously only mounted when in production mode
This commit is contained in:
parent
a2ce2e1116
commit
fb6fac5f9a
@ -4,6 +4,6 @@ from confz import BaseConfig, EnvSource
|
||||
|
||||
|
||||
class OperationMode(BaseConfig): # type: ignore
|
||||
environment: Literal["development"] | Literal["production"] = "production"
|
||||
environment: Literal["development"] | Literal["production"] = "development"
|
||||
|
||||
CONFIG_SOURCES = EnvSource(allow=["ENVIRONMENT"])
|
||||
|
@ -8,7 +8,6 @@ from fastapi.staticfiles import StaticFiles
|
||||
from loguru import logger
|
||||
|
||||
from pydase import DataService
|
||||
from pydase.config import OperationMode
|
||||
from pydase.version import __version__
|
||||
|
||||
|
||||
@ -115,7 +114,6 @@ class WebAPI:
|
||||
def service_properties() -> dict[str, Any]:
|
||||
return self.service.serialize()
|
||||
|
||||
if OperationMode().environment == "production":
|
||||
app.mount(
|
||||
"/",
|
||||
StaticFiles(
|
||||
|
Loading…
x
Reference in New Issue
Block a user