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]
fn new() -> Server
Creates a new markdown preview server.
fn new_with_config(config: Config) -> 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() });
fn start(&mut self) -> Handle
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.