hagrid-keyserver--hagrid/src/main.rs

48 lines
850 B
Rust
Raw Permalink Normal View History

2018-12-25 21:35:04 +00:00
#![feature(proc_macro_hygiene, plugin, decl_macro)]
2018-08-16 18:35:19 +00:00
#![recursion_limit = "1024"]
use failure::Fallible as Result;
2019-02-07 19:58:31 +00:00
#[macro_use]
extern crate serde_derive;
2018-09-19 20:24:38 +00:00
2019-02-07 19:58:31 +00:00
#[macro_use]
extern crate rocket;
2019-05-23 23:01:24 +00:00
#[macro_use]
2019-02-07 19:58:31 +00:00
extern crate rocket_contrib;
2018-09-19 20:24:38 +00:00
#[cfg(test)]
extern crate regex;
extern crate hagrid_database as database;
2019-08-28 18:33:24 +00:00
use gettext_macros::init_i18n;
2019-12-11 09:25:39 +00:00
init_i18n!("hagrid", en, de, fr, pl, tr, zh_Hans);
2019-08-28 18:33:24 +00:00
mod mail;
mod anonymize_utils;
2019-04-02 12:54:40 +00:00
mod tokens;
mod sealed_state;
2019-05-05 11:29:10 +00:00
mod rate_limiter;
mod dump;
mod counters;
2019-09-27 14:21:10 +00:00
mod i18n;
mod gettext_strings;
2019-08-28 18:33:24 +00:00
mod web;
mod template_helpers;
2018-08-16 18:35:19 +00:00
fn main() {
if let Err(e) = web::serve() {
let mut cause = e.as_fail();
eprint!("{}", cause);
while let Some(c) = cause.cause() {
eprint!(":\n {}", c);
cause = c;
}
eprintln!();
2019-08-27 21:56:19 +00:00
::std::process::exit(2);
2018-09-19 20:24:38 +00:00
}
}