1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-30 01:06:27 +00:00
comunicapiv3/src/main.rs
2020-05-21 15:28:07 +02:00

17 lines
470 B
Rust

use comunic_server::data::config::{conf, Config};
use comunic_server::helpers::database;
use comunic_server::controllers::server;
#[actix_rt::main]
async fn main() -> std::io::Result<()> {
// Load configuration
Config::load("config.yaml").expect("Could not load configuration!");
// Connect to the database
database::connect(&conf().database).expect("Could not connect to database!");
// Start the server
server::start_server(conf()).await
}