1234567891011121314151617181920212223242526272829303132 |
- #![feature(proc_macro_hygiene, decl_macro)]
-
- #[macro_use]
- extern crate diesel;
- extern crate dotenv;
- extern crate r2d2;
- extern crate r2d2_diesel;
- #[macro_use]
- extern crate rocket;
- extern crate rocket_contrib;
- #[macro_use]
- extern crate serde_derive;
-
- use dotenv::dotenv;
- use rocket_contrib::templates::Template;
-
- mod connection;
- mod gists;
- mod routes;
- mod schema;
-
- use crate::routes::static_rocket_route_info_for_index;
- use crate::routes::static_rocket_route_info_for_show_gist;
-
- fn main() {
- dotenv().ok();
- rocket::ignite()
- .attach(Template::fairing())
- .manage(connection::init_pool())
- .mount("/", routes![index, show_gist])
- .launch();
- }
|