Remove old binaries
This commit is contained in:
parent
1173958880
commit
161758786a
3 changed files with 0 additions and 75 deletions
|
@ -45,12 +45,3 @@ clap = { version = "4.4", features = ["derive"] }
|
|||
[[bin]]
|
||||
name = "cratedocs"
|
||||
path = "src/bin/cratedocs.rs"
|
||||
|
||||
# Keep existing binaries for backward compatibility
|
||||
[[bin]]
|
||||
name = "stdio-server"
|
||||
path = "src/bin/stdio_server.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "http-sse-server"
|
||||
path = "src/bin/sse_server.rs"
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
use anyhow::Result;
|
||||
use std::net::SocketAddr;
|
||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
||||
use cratedocs_mcp::transport::http_sse_server::App;
|
||||
|
||||
const BIND_ADDRESS: &str = "127.0.0.1:8080";
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
// Setup tracing
|
||||
tracing_subscriber::registry()
|
||||
.with(
|
||||
tracing_subscriber::EnvFilter::try_from_default_env()
|
||||
.unwrap_or_else(|_| format!("info,{}=debug", env!("CARGO_CRATE_NAME")).into()),
|
||||
)
|
||||
.with(tracing_subscriber::fmt::layer())
|
||||
.init();
|
||||
|
||||
// Parse socket address
|
||||
let addr: SocketAddr = BIND_ADDRESS.parse()?;
|
||||
let listener = tokio::net::TcpListener::bind(addr).await?;
|
||||
|
||||
tracing::debug!("Rust Documentation Server listening on {}", listener.local_addr()?);
|
||||
tracing::info!("Access the Rust Documentation Server at http://{}/sse", BIND_ADDRESS);
|
||||
|
||||
// Create app and run server
|
||||
let app = App::new();
|
||||
axum::serve(listener, app.router()).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
use anyhow::Result;
|
||||
use mcp_server::router::RouterService;
|
||||
use mcp_server::{ByteTransport, Server};
|
||||
use cratedocs_mcp::tools::DocRouter;
|
||||
use tokio::io::{stdin, stdout};
|
||||
use tracing_appender::rolling::{RollingFileAppender, Rotation};
|
||||
use tracing_subscriber::{self, EnvFilter};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
// Set up file appender for logging
|
||||
let file_appender = RollingFileAppender::new(Rotation::DAILY, "logs", "doc-server.log");
|
||||
|
||||
// Initialize the tracing subscriber with file and stdout logging
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(EnvFilter::from_default_env().add_directive(tracing::Level::INFO.into()))
|
||||
.with_writer(file_appender)
|
||||
.with_target(false)
|
||||
.with_thread_ids(true)
|
||||
.with_file(true)
|
||||
.with_line_number(true)
|
||||
.init();
|
||||
|
||||
tracing::info!("Starting MCP documentation server");
|
||||
|
||||
// Create an instance of our documentation router
|
||||
let router = RouterService(DocRouter::new());
|
||||
|
||||
// Create and run the server
|
||||
let server = Server::new(router);
|
||||
let transport = ByteTransport::new(stdin(), stdout());
|
||||
|
||||
tracing::info!("Documentation server initialized and ready to handle requests");
|
||||
Ok(server.run(transport).await?)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue