serve static files again
This commit is contained in:
@@ -24,11 +24,10 @@ fn client_id(cookies: CookieJar) -> (CookieJar, String) {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
// build our application with a single route
|
|
||||||
let app = Router::new()
|
let app = Router::new()
|
||||||
.route("/", get(index::index))
|
.route("/", get(index::index))
|
||||||
.merge(game::routes())
|
.nest_service("/static", ServeDir::new("./static/serve"))
|
||||||
.fallback_service(ServeDir::new("./static/serve"));
|
.merge(game::routes());
|
||||||
|
|
||||||
// run our app with hyper, listening globally on port 3000
|
// run our app with hyper, listening globally on port 3000
|
||||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||||
|
@@ -6,8 +6,8 @@ pub fn new(content: Markup) -> Markup {
|
|||||||
head {
|
head {
|
||||||
meta charset="utf-8";
|
meta charset="utf-8";
|
||||||
meta name="viewport" content="width=device-width, initial-scale=1.0";
|
meta name="viewport" content="width=device-width, initial-scale=1.0";
|
||||||
link rel="stylesheet" href="/pico.min.css";
|
link rel="stylesheet" href="/static/pico.min.css";
|
||||||
link rel="stylesheet" href="/style.css";
|
link rel="stylesheet" href="/static/style.css";
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
header.container {
|
header.container {
|
||||||
@@ -38,7 +38,7 @@ pub fn new(content: Markup) -> Markup {
|
|||||||
a target="_blank" href="https://www.digidow.eu/impressum/" { "Impressum" }
|
a target="_blank" href="https://www.digidow.eu/impressum/" { "Impressum" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
script src="/theme.js" {}
|
script src="/static/theme.js" {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user