2020-10-14 20:36:24 +00:00
|
|
|
#![feature(decl_macro, proc_macro_hygiene)]
|
2020-10-13 23:40:03 +00:00
|
|
|
|
2020-10-15 00:16:06 +00:00
|
|
|
#[cfg(test)] mod tests;
|
|
|
|
|
2020-10-16 05:33:52 +00:00
|
|
|
mod config;
|
2020-10-14 21:47:16 +00:00
|
|
|
mod database;
|
2020-10-21 03:26:48 +00:00
|
|
|
mod forms;
|
2020-10-21 04:05:54 +00:00
|
|
|
mod i18n;
|
2020-10-21 03:26:48 +00:00
|
|
|
mod models;
|
2020-10-17 04:52:06 +00:00
|
|
|
mod responses;
|
2020-10-21 03:26:48 +00:00
|
|
|
mod routes;
|
2020-10-14 21:28:09 +00:00
|
|
|
mod schema;
|
2020-10-21 03:26:48 +00:00
|
|
|
mod states;
|
|
|
|
mod views;
|
|
|
|
mod web;
|
2020-10-14 21:28:09 +00:00
|
|
|
|
|
|
|
#[macro_use] extern crate diesel;
|
2020-10-13 23:40:03 +00:00
|
|
|
#[macro_use] extern crate rocket;
|
2020-10-14 00:13:00 +00:00
|
|
|
#[macro_use] extern crate serde_derive;
|
2020-10-14 20:27:21 +00:00
|
|
|
|
2020-10-14 00:26:03 +00:00
|
|
|
fn main() {
|
2020-10-15 03:44:51 +00:00
|
|
|
dotenv::dotenv().unwrap();
|
|
|
|
let config = config::Config::from_env().unwrap();
|
2020-10-15 03:53:31 +00:00
|
|
|
println!("Running with {:#?}", config);
|
2020-10-15 18:55:10 +00:00
|
|
|
println!("Public path: {:#?}", config.public_path().unwrap());
|
2020-10-16 05:33:52 +00:00
|
|
|
web::rocket(&config).unwrap().launch();
|
2020-10-13 23:40:03 +00:00
|
|
|
}
|