mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 15:29:21 +00:00
18 lines
471 B
Rust
18 lines
471 B
Rust
use comunic_server::controllers::server;
|
|
use comunic_server::data::config::{conf, Config};
|
|
use comunic_server::helpers::database;
|
|
|
|
|
|
#[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
|
|
}
|