mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-29 13:52:46 -07:00
Proxy vite dev server (#10)
* refactor: pass reqwest from tuono_lib crate and prepared vite_reverse_proxy * feat: add proxy entry point on vite side * refactor: internal_handlers_folder * feat: handle vite websocket tunnel * feat: handle unexpect WebSocket messages * feat: split dev/prod ssr handling * feat: split js/rust bundle reloading * feat: prevent close error on websocket connection * feat: remove vite proxy on prod server * feat: update version to v0.4.0
This commit is contained in:
@@ -11,13 +11,12 @@ pub fn handler_core(_args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
use tuono_lib::axum::response::IntoResponse;
|
||||
use std::collections::HashMap;
|
||||
use tuono_lib::axum::extract::{State, Path};
|
||||
use reqwest::Client;
|
||||
|
||||
#item
|
||||
|
||||
pub async fn route(
|
||||
Path(params): Path<HashMap<String, String>>,
|
||||
State(client): State<Client>,
|
||||
State(client): State<tuono_lib::reqwest::Client>,
|
||||
request: tuono_lib::axum::extract::Request
|
||||
) -> impl IntoResponse {
|
||||
let pathname = &request.uri();
|
||||
@@ -30,7 +29,7 @@ pub fn handler_core(_args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
|
||||
pub async fn api(
|
||||
Path(params): Path<HashMap<String, String>>,
|
||||
State(client): State<Client>,
|
||||
State(client): State<tuono_lib::reqwest::Client>,
|
||||
request: tuono_lib::axum::extract::Request
|
||||
) -> impl IntoResponse{
|
||||
let pathname = &request.uri();
|
||||
|
||||
Reference in New Issue
Block a user