| Crates.io | ws-markdown-server |
| lib.rs | ws-markdown-server |
| version | 1.0.2 |
| created_at | 2023-01-15 05:04:19.184288+00 |
| updated_at | 2023-01-15 12:35:28.169702+00 |
| description | A simple Websocket (as well as a Unix socket) server that serves on-the-fly compilation of Markdown to HTML. |
| homepage | https://github.com/aalekhpatel07/ws-markdown-server |
| repository | https://github.com/aalekhpatel07/ws-markdown-server |
| max_upload_size | |
| id | 759215 |
| size | 84,448 |
A simple Markdown Websocket (and Unix socket) server backed by comrak and tokio-tungstenite.
docker pull aalekhpatel07/ws-markdown-server:1.0.2
Note: The 9004 tcp port bind is optional and only required if you wish to expose a Unix socket server along with a WebSocket server (which runs on 9003).
docker run \
-d \
-p 9003:9003 \
-p 9004:9004 \
--name ws-markdown-server \
aalekhpatel07/ws-markdown-server:1.0.0
You can run a Markdown server on your local machine via ws-markdown-server:
cargo:cargo install ws-markdown-server@1.0.2
RUST_LOG="ws_markdown_server=debug" \
MD_SERVER_WS_PORT=9003 \
MD_SERVER_TCP_PORT=9004 \
MD_SERVER_HOST="0.0.0.0" \
ws-markdown-server
0.0.0.0:9004 and sending in some markdown text to be converted to html.
For example:# Start netcat once the markdown server is up and running.
nc 0.0.0.0 9004
# Send some markdown text to be converted to html.
> # Title
> This is some text.
> ...
> [Ctrl+D] (indicates end of file)
# You'll receive the html version of the sent markdown:
# <h1> Title </h1>
# <p>This is some text.</p>
# ...
Svelte app that sets up the client-side Websocket and uses the ws-markdown-server for its backend.cd usage/client
npm install
npm run dev -- --port 8000 --host 0.0.0.0 --open