Web viewer for ripcord log db
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

3 years ago
mod database;
mod graphql;
use clap::{App, Arg};
use database::scan_dbs;
use graphql::server;
fn main() -> std::io::Result<()> {
let cmd = App::new("Riplog")
.help("Base directory containing ripcord db files")
.help("Address to bind to")
.help("Port to listen on")
3 years ago
let basedir = cmd.value_of("basedir").unwrap();
let addr = cmd.value_of("bind").unwrap();
let port = cmd.value_of("port").unwrap().parse().unwrap();
3 years ago
let logs = scan_dbs(basedir);
println!("Loaded data for {} workspaces", logs.len());
server(addr, port, logs);
3 years ago