aboutsummaryrefslogtreecommitdiff
path: root/lockchain-server/src/main.rs
blob: bb02f6b45161d80a8d2735b46de6487d3f57ea34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Core lockchain application server

extern crate clap;

extern crate lockchain_core as core;
extern crate lockchain_files as files;
extern crate lockchain_http as http;

use crate::core::EncryptedBody;
use crate::files::FileVault;
use crate::http::{create_server, state::ApiState};

fn main() {
    let state = ApiState::<EncryptedBody, FileVault<EncryptedBody>> {
        bound_scope: true,
        working_dir: ".".into(),

        // This is a dangerous option
        administrative: true,
        ..Default::default()
    };

    let server = create_server("localhost", "9999", state);
    server.unwrap().run();
}