@@ 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();
}