/*
* This file is part of laurelin/server
* Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
*
* Licensed under GPL-3.0-only.
* See LICENSE for licensing information.
*/
use bevy_ecs::system::ResMut;
use bevy_log::info;
use bevy_quinnet::server::{certificate::CertificateRetrievalMode, Server, ServerConfiguration};
pub fn init(mut server: ResMut<Server>) {
info!("Laurelin server listening");
// TODO: handle unwraps
server
.start_endpoint(
ServerConfiguration::from_string("0.0.0.0:6000").unwrap(),
CertificateRetrievalMode::GenerateSelfSigned {
server_hostname: "127.0.0.1".to_string(),
},
)
.unwrap();
}