Rename to Locality

This commit is contained in:
Matthew Gordon 2024-02-19 21:55:15 -04:00
parent 5ad4f80fc1
commit a2887ecc36
6 changed files with 7 additions and 7 deletions

View File

@ -1,2 +1,2 @@
[env]
LOCALHUB_STATIC_FILE_PATH = { value = "static", relative = true }
LOCALITY_STATIC_FILE_PATH = { value = "static", relative = true }

View File

@ -1,5 +1,5 @@
[package]
name = "localhub"
name = "locality"
version = "0.1.0"
edition = "2021"

View File

@ -15,5 +15,5 @@ struct IndexTemplate<'a> {
}
async fn root<'a>() -> IndexTemplate<'a> {
IndexTemplate { title: "LocalHub" }
IndexTemplate { title: "Locality" }
}

View File

@ -1,6 +1,6 @@
use {std::env, thiserror::Error};
const ENV_VAR_PREFIX: &str = "LOCALHUB_";
const ENV_VAR_PREFIX: &str = "LOCALITY_";
#[derive(Error, Debug)]
pub enum Error {

View File

@ -182,7 +182,7 @@ mod tests {
use super::*;
async fn test_db() -> Database {
let url = std::env::var("LOCALHUB_TEST_DATABASE_URL").unwrap();
let url = std::env::var("LOCALITY_TEST_DATABASE_URL").unwrap();
Database::new(&url)
.unwrap()
.connection_pool

View File

@ -21,7 +21,7 @@ pub enum Error {
fn main() {
let runtime = tokio::runtime::Runtime::new().unwrap();
std::process::exit(match runtime.block_on(localhub_main()) {
std::process::exit(match runtime.block_on(locality_main()) {
Ok(()) => 0,
Err(err) => {
eprintln!("ERROR: {}", err);
@ -30,7 +30,7 @@ fn main() {
})
}
async fn localhub_main() -> Result<(), Error> {
async fn locality_main() -> Result<(), Error> {
let config = get_config()?;
let db_pool = Database::new(&config.database_url)?;