Rename doc server to stdio server

This commit is contained in:
Danielle Jenkins 2025-03-12 14:52:36 -07:00
parent 12b077b7be
commit 03cb33ba7b
7 changed files with 8 additions and 8 deletions

View file

@ -2,7 +2,7 @@
## Build Commands
- Build project: `cargo build`
- Run STDIN/STDOUT server: `cargo run --bin doc-server`
- Run STDIN/STDOUT server: `cargo run --bin stdio-server`
- Run HTTP/SSE server: `cargo run --bin axum-docs`
- Run tests: `cargo test`
- Run specific test: `cargo test test_name`

View file

@ -48,8 +48,8 @@ path = "src/bin/cratedocs.rs"
# Keep existing binaries for backward compatibility
[[bin]]
name = "doc-server"
path = "src/bin/doc_server.rs"
name = "stdio-server"
path = "src/bin/stdio_server.rs"
[[bin]]
name = "http-sse-server"

View file

@ -44,7 +44,7 @@ For backward compatibility, you can still use the original binaries:
```bash
# STDIN/STDOUT Mode
cargo run --bin doc-server
cargo run --bin stdio-server
# HTTP/SSE Mode
cargo run --bin axum-docs

View file

@ -12,7 +12,7 @@ The server consists of several key components:
- Implements caching to avoid redundant API requests
2. **Transport Implementations**:
- STDIN/STDOUT server (`src/bin/doc_server.rs`)
- STDIN/STDOUT server (`src/bin/stdio_server.rs`)
- HTTP/SSE server (`src/bin/axum_docs.rs`)
3. **Utilities**:

View file

@ -6,9 +6,9 @@ use tokio::io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader};
// Simple example client for interacting with the doc server via stdin/stdout
async fn stdio_client() -> Result<()> {
// Start the doc-server in a separate process
// Start the stdio-server in a separate process
let mut child = tokio::process::Command::new("cargo")
.args(["run", "--bin", "doc-server"])
.args(["run", "--bin", "stdio-server"])
.stdin(std::process::Stdio::piped())
.stdout(std::process::Stdio::piped())
.spawn()?;

View file

@ -48,7 +48,7 @@ async fn main() -> Result<()> {
async fn run_stdio_server(debug: bool) -> Result<()> {
// Set up file appender for logging
let file_appender = RollingFileAppender::new(Rotation::DAILY, "logs", "doc-server.log");
let file_appender = RollingFileAppender::new(Rotation::DAILY, "logs", "stdio-server.log");
// Initialize the tracing subscriber with file logging
let level = if debug { tracing::Level::DEBUG } else { tracing::Level::INFO };