Set up Rocket for testing environment
This commit is contained in:
@@ -41,7 +41,7 @@ pub enum InvalidRocketConfig {
|
||||
SecretKey,
|
||||
}
|
||||
|
||||
fn get_rocket_config() -> Result<RocketConfig, InvalidRocketConfig> {
|
||||
pub fn get_rocket_config() -> Result<RocketConfig, InvalidRocketConfig> {
|
||||
let mut c = RocketConfig::active().map_err(|_| InvalidRocketConfig::Env)?;
|
||||
|
||||
let address = var("ROCKET_ADDRESS").unwrap_or_else(|_| "localhost".to_owned());
|
||||
|
||||
@@ -305,7 +305,7 @@ macro_rules! last {
|
||||
}
|
||||
|
||||
mod config;
|
||||
pub use config::{Config, CONFIG};
|
||||
pub use config::{get_rocket_config, Config, SearchTokenizerConfig, CONFIG};
|
||||
|
||||
pub fn ap_url(url: &str) -> String {
|
||||
format!("https://{}", url)
|
||||
|
||||
Reference in New Issue
Block a user