Deploy front end to root directory
This commit is contained in:
@@ -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))?
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user