tsk-208: Moving config and endpoint code #236
@@ -1,4 +1,3 @@
|
||||
|
||||
/// Full hosting address that the application will be broadcasting
|
||||
pub fn get_full() -> String {
|
||||
format!("{ADDRESS}:{PORT}")
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
pub mod auth;
|
||||
pub mod config;
|
||||
pub mod callers;
|
||||
pub mod config;
|
||||
pub mod repo;
|
||||
|
||||
pub mod db {
|
||||
@@ -42,7 +42,9 @@ async fn main() {
|
||||
// build our application with a route
|
||||
let app = init::app().await;
|
||||
|
||||
let listener = tokio::net::TcpListener::bind(config::host::get_full()).await.unwrap();
|
||||
let listener = tokio::net::TcpListener::bind(config::host::get_full())
|
||||
.await
|
||||
.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
|
||||
@@ -305,8 +307,6 @@ pub mod init {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io::Write;
|
||||
|
||||
Reference in New Issue
Block a user