#vimwiki #parser #graphql #named #name #text #graphql-server

bin+lib vimwiki-server

Daemon that supports parsing and modifying vimwiki files

6 releases

0.1.0 Jun 6, 2021
0.1.0-alpha.5 Nov 7, 2020
0.1.0-alpha.3 Oct 22, 2020
0.1.0-alpha.1 Sep 14, 2020

#798 in HTTP server

MIT/Apache

235KB
6K SLoC

vimwiki server

Provides graphql server to inspect and manipulate vimwiki files.

While this was supposed to be named vimwiki_server, it accidentally was published as vimwiki-server and now we're stuck with that name. :/

Usage

Binary

Download a binary and place in your path.

Or, install using cargo:

cargo install vimwiki-server

Library

Add this to your Cargo.toml:

[dependencies]
vimwiki-server = "0.1"

Examples

Binary

Running the binary from the command line with http://127.0.0.1/graphiql enabled:

vimwiki-server --graphiql

Library

Embedding and running the server from your own binary:

use vimwiki_server::{Config, Opt, Program};

#[tokio::main]
async fn main() {
    // Load configuration for the server from the CLI arguments
    let opt = Opt::load();

    // Read in a config file (or default config) for use by server
    let config = Config::load(&opt).unwrap();

    // Start the server program
    Program::run(opt, config)
        .await
        .expect("Server failed unexpectedly");
}

License

This project is licensed under either of

Apache License, Version 2.0, (LICENSE-APACHE or apache-license) MIT license (LICENSE-MIT or mit-license) at your option.

Dependencies

~30–45MB
~808K SLoC