Use caddy for dev server
This commit is contained in:
4
Caddyfile
Normal file
4
Caddyfile
Normal file
@@ -0,0 +1,4 @@
|
||||
:2000 {
|
||||
reverse_proxy 127.0.0.1:5173
|
||||
reverse_proxy /api/* 127.0.0.1:3000
|
||||
}
|
||||
@@ -97,8 +97,8 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
}
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let app = Route::new().at("/", get(index)).at(
|
||||
"/ws/:name",
|
||||
let app = Route::new().at("/api/", get(index)).at(
|
||||
"/api/ws/:name",
|
||||
get(ws.data(tokio::sync::broadcast::channel::<String>(32).0)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user