Struct aurelius::Server [] [src]

pub struct Server { /* fields omitted */ }

The Server type constructs a new markdown preview server.

The server will listen for HTTP and WebSocket connections on arbitrary ports.

Methods

impl Server
[src]

Creates a new markdown preview server.

Creates a new configuration with the config struct.

Example

use std::default::Default;
use aurelius::{Config, Server};

let server = Server::new_with_config(Config {
    highlight_theme: "github".to_owned(), .. Default::default()
});

Starts the server.

Returns a channel that can be used to send markdown to the server. The markdown will be sent as HTML to all clients of the websocket server.