You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
363 B
13 lines
363 B
use crate::config::CONFIG;
|
|
use valence::bevy_ecs::{self, prelude::*};
|
|
|
|
#[derive(Resource)]
|
|
pub struct Connection(pub redis::Connection);
|
|
|
|
pub fn setup(mut commands: Commands) {
|
|
let client = redis::Client::open(CONFIG.db.address.clone()).unwrap();
|
|
let connection = client.get_connection().unwrap();
|
|
|
|
commands.insert_resource(Connection(connection));
|
|
}
|