Use caddy for dev server
This commit is contained in:
parent
db5aa38ccb
commit
5c99ee71e3
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();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
let app = Route::new().at("/", get(index)).at(
|
let app = Route::new().at("/api/", get(index)).at(
|
||||||
"/ws/:name",
|
"/api/ws/:name",
|
||||||
get(ws.data(tokio::sync::broadcast::channel::<String>(32).0)),
|
get(ws.data(tokio::sync::broadcast::channel::<String>(32).0)),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user