port 3111
This commit is contained in:
+8
-5
@@ -1,10 +1,10 @@
|
||||
mod state;
|
||||
mod handlers;
|
||||
mod models;
|
||||
mod state;
|
||||
|
||||
use axum::{
|
||||
routing::{get, post},
|
||||
Router,
|
||||
routing::{get, post},
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use tower_http::services::ServeDir;
|
||||
@@ -30,14 +30,17 @@ async fn main() {
|
||||
.route("/ws/agent/:agent_id", get(handlers::ws::agent_ws))
|
||||
.route("/messages/:session_id", get(handlers::chat::get_messages))
|
||||
.route("/send/:session_id", post(handlers::chat::send_message))
|
||||
.route("/agent/send/:session_id", post(handlers::chat::agent_send_message))
|
||||
.route(
|
||||
"/agent/send/:session_id",
|
||||
post(handlers::chat::agent_send_message),
|
||||
)
|
||||
.route("/sessions", get(handlers::chat::get_sessions))
|
||||
.route("/sessions/new", post(handlers::chat::new_session))
|
||||
.nest_service("/static", ServeDir::new("static"))
|
||||
.with_state(state);
|
||||
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||
tracing::info!("Chat service running — http://0.0.0.0:3000");
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3111").await.unwrap();
|
||||
tracing::info!("Chat service running — http://0.0.0.0:3111");
|
||||
axum::Server::from_tcp(listener.into_std().unwrap())
|
||||
.unwrap()
|
||||
.serve(app.into_make_service())
|
||||
|
||||
Reference in New Issue
Block a user