aboutsummaryrefslogtreecommitdiff
path: root/lockchain-server/src/main.rs
blob: d96c2136d251d483c494e88fd655c04ab88d3169 (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 core::EncryptedBody;
use files::FileVault;
use 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();
}