This is a simple HTTP server written in Rust that accepts Markdown content via POST requests and returns the corresponding HTML. It uses the warp
web framework for handling HTTP requests and pulldown-cmark
for parsing Markdown.
- Accepts Markdown content via HTTP POST requests.
- Converts Markdown to HTML.
- Returns the HTML as the response.
-
Clone the repository:
git clone https://github.com/darshansrc/markdown-parser-rust.git cd markdown-parser-rust
-
Build the project:
cargo build
-
Run the server:
cargo run
The server will start on
localhost:3030
.
You can test the server using curl
or any HTTP client by sending a POST request with Markdown content.
Example using curl
:
curl -X POST -d '# Hello World' http://localhost:3030
This will return:
<h1>Hello World</h1>
- warp - A super-easy, composable, web server framework for warp speeds.
- tokio - An asynchronous runtime for the Rust programming language.
- pulldown-cmark - A library for parsing Markdown.
- bytes - Utilities for working with bytes.
This project is licensed under the MIT License. See the LICENSE file for details.