Add deploy.sh endpoint and one-command installation flow
This commit is contained in:
1 parent
900f72a299
commit
1a9bf096f3
4 files changed
+102
-29
No files matched your search
@@ -120,3 +120,16 @@ pub async fn root_landing() -> Response {
|
||||
Err(_) => (StatusCode::NOT_FOUND, "Not Found").into_response(),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn deploy_script() -> Response {
|
||||
match tokio::fs::read("www/deploy.sh").await {
|
||||
Ok(content) => (
|
||||
StatusCode::OK,
|
||||
[("content-type", "text/plain; charset=utf-8")],
|
||||
content,
|
||||
)
|
||||
.into_response(),
|
||||
|
||||
Err(_) => (StatusCode::NOT_FOUND, "deploy.sh not found").into_response(),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user