Rename Things, refactor some code

BREAKING: renames `binding_ip_addr` to `binding_ip` and `redis_connection_url` to `redis_url`.

Renames a lot of internals as well, but they are to many to mention.
This commit is contained in:
Milim 2023-07-03 19:30:25 +02:00
parent b18db5414a
commit 440216871d
17 changed files with 80 additions and 74 deletions

View file

@ -2,10 +2,10 @@
//! and register all the routes for the `websurfx` meta search engine website.
pub mod cache;
pub mod config_parser;
pub mod config;
pub mod engines;
pub mod handler;
pub mod search_results_handler;
pub mod results;
pub mod server;
use std::net::TcpListener;
@ -14,9 +14,9 @@ use crate::server::routes;
use actix_files as fs;
use actix_web::{dev::Server, middleware::Logger, web, App, HttpServer};
use config_parser::parser::Config;
use config::parser::Config;
use handlebars::Handlebars;
use handler::public_path_handler::handle_different_public_path;
use handler::public_paths::get_public_path;
/// Runs the web server on the provided TCP listener and returns a `Server` instance.
///
@ -41,7 +41,7 @@ use handler::public_path_handler::handle_different_public_path;
pub fn run(listener: TcpListener, config: Config) -> std::io::Result<Server> {
let mut handlebars: Handlebars = Handlebars::new();
let public_folder_path: String = handle_different_public_path()?;
let public_folder_path: String = get_public_path()?;
handlebars
.register_templates_directory(".html", format!("{}/templates", public_folder_path))