move assets, setup everything
This commit is contained in:
parent
0cbee2e73e
commit
3fe2c50961
75 changed files with 28 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
|||
use agahnim_web_v2::templates::index::home;
|
||||
use axum::{Router, routing::get};
|
||||
use tower_http::services::ServeDir;
|
||||
#[cfg(debug_assertions)]
|
||||
use tower_livereload::LiveReloadLayer;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
|
|
@ -8,6 +10,10 @@ async fn main() {
|
|||
.route("/", get(home))
|
||||
.nest_service("/static", ServeDir::new("static"));
|
||||
|
||||
// We need to include this flag so that the live reload layer isn't included when the server is built
|
||||
#[cfg(debug_assertions)]
|
||||
let app = app.layer(LiveReloadLayer::new());
|
||||
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:7122")
|
||||
.await
|
||||
.expect("Failed to bind to port 7122");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue