port 3111

This commit is contained in:
Bartal Læarsson
2026-06-18 09:50:23 +01:00
parent 385727b09d
commit df0a578207
+8 -5
View File
@@ -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())