DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

dbc7bc74ab061a8db57e6bf0840b4e0eedc349f4 — Jonni Liljamo 1 year, 10 months ago f95462c
feat(server): the very basics of the server
1 files changed, 23 insertions(+), 1 deletions(-)

M server/src/main.rs
M server/src/main.rs => server/src/main.rs +23 -1
@@ 6,6 6,28 @@
 * See LICENSE for licensing information.
 */

use bevy_app::{App, CoreStage, ScheduleRunnerPlugin};
use bevy_core::CorePlugin;
use bevy_log::{info, LogPlugin};

use naia_bevy_server::{Plugin as ServerPlugin, ServerConfig, Stage};

use laurelin_shared::server::protocol::protocol;

fn main() {
    println!("Hello, world!");
    let mut server = App::new();

    server
        // plugins
        .add_plugin(CorePlugin::default())
        .add_plugin(ScheduleRunnerPlugin::default())
        .add_plugin(LogPlugin {
            // NOTE: overridden by RUST_LOG environment variable
            level: bevy_log::Level::INFO,
            ..Default::default()
        })
        .add_plugin(ServerPlugin::new(ServerConfig::default(), protocol()));

    info!("Laurelin server starting");
    server.run();
}