add css and dist handling
parent
20b214e262
commit
3aec5256ba
|
@ -0,0 +1 @@
|
|||
|
|
@ -14,6 +14,7 @@ use diesel_async::{
|
|||
};
|
||||
use dotenvy::dotenv;
|
||||
use std::net::SocketAddr;
|
||||
use tower_http::services::ServeDir;
|
||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
|
||||
|
@ -61,6 +62,7 @@ async fn main() {
|
|||
.nest("/api", api::router())
|
||||
.route("/", get(root))
|
||||
.route("/shifts/:id/drinks", get(drinks))
|
||||
.fallback_service(ServeDir::new("./dist"))
|
||||
.with_state(state);
|
||||
|
||||
// run our app with hyper
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<!-- <link rel="icon" href="/icon.svg" type="image/svg+xml"> -->
|
||||
|
||||
<link rel="stylesheet" href="/app.css" />
|
||||
|
||||
<script src="https://unpkg.com/htmx.org@@1.9.5"></script>
|
||||
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue