DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: dev-old-rt-server deck-builder/server/src/systems/init.rs -rw-r--r-- 709 bytes
cf16e4a7Jonni Liljamo WIP: something something changing to quinnet, cant be bothered rn 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * 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();
}