summaryrefslogtreecommitdiff
path: root/src/repo/constants.rs
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2021-04-07 18:54:22 -0400
committerAdam T. Carpenter <atc@53hor.net>2021-04-07 18:54:22 -0400
commit881e4bf3c9141b4bebaefaf6385652ed46d9a9fe (patch)
treea56a068b4f725c386de7575c7f9a2f084363a16f /src/repo/constants.rs
parentb1c45640a72300433800c8370657335616f8c541 (diff)
downloadtwinh-881e4bf3c9141b4bebaefaf6385652ed46d9a9fe.tar.xz
twinh-881e4bf3c9141b4bebaefaf6385652ed46d9a9fe.zip
added some demo login template, functionality, also added basic kv store test and ui demo
Diffstat (limited to 'src/repo/constants.rs')
-rw-r--r--src/repo/constants.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/repo/constants.rs b/src/repo/constants.rs
new file mode 100644
index 0000000..e168a77
--- /dev/null
+++ b/src/repo/constants.rs
@@ -0,0 +1,11 @@
+use once_cell::sync::Lazy;
+use sled::{Config, Db};
+
+pub const PARTS_TREE: &str = "parts";
+pub const CARS_TREE: &str = "cars";
+pub static REPO_INSTANCE: Lazy<Db> = Lazy::new(|| {
+ Config::default()
+ .path("/tmp/twinh")
+ .open()
+ .expect("Couldn't open DB!")
+});