Deploy front end to root directory

This commit is contained in:
2026-04-02 01:58:26 -04:00
parent 55b37e5156
commit 3de54fa0dc
4 changed files with 4 additions and 4 deletions

View File

@@ -116,9 +116,9 @@ async fn main() -> std::io::Result<()> {
let cors = Cors::permissive();
App::new()
.wrap(cors)
.service(Files::new("/admin", "/var/www/did_router/").index_file("index.html"))
.service(
web::scope("/api").configure(api_config))
.service(Files::new("/", "/var/www/did_router/").index_file("index.html"))
.default_service(web::route().to(index))
})
.bind(("0.0.0.0", 3000))?

View File

@@ -4,5 +4,5 @@ port = 8080
[[hooks]]
stage = "pre_build"
command = "./tailwindcss.exe"
command = "./tailwindcss"
command_arguments = ["-i", "input.css", "-o", "./dist/.stage/app.css"]

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>Did Router</title>
<link rel="stylesheet" href="admin/app.css" />
<link rel="stylesheet" href="app.css" />
</head>
<body></body>
</html>

View File

@@ -1,5 +1,5 @@
build:
trunk build --release --public-url ./admin/
trunk build --release
install: build
mkdir -p /var/www/did_router
cp dist/* /var/www/did_router/