Change default backend API port
This commit is contained in:
parent
8e5ecb1b98
commit
a59b342b96
4 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Server Configuration
|
# Server Configuration
|
||||||
HOST=127.0.0.1
|
HOST=127.0.0.1
|
||||||
PORT=3000
|
PORT=3001
|
||||||
|
|
||||||
# Optional: Logging Configuration
|
# Optional: Logging Configuration
|
||||||
RUST_LOG=info
|
RUST_LOG=info
|
|
@ -1,6 +1,6 @@
|
||||||
# Server Configuration
|
# Server Configuration
|
||||||
HOST=127.0.0.1
|
HOST=127.0.0.1
|
||||||
PORT=3000
|
PORT=3001
|
||||||
|
|
||||||
# Database Configuration
|
# Database Configuration
|
||||||
DATABASE_URL=postgres://postgres:password@localhost:5432/sharenet
|
DATABASE_URL=postgres://postgres:password@localhost:5432/sharenet
|
||||||
|
|
|
@ -14,7 +14,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
// Get configuration from environment variables
|
// Get configuration from environment variables
|
||||||
let host = env::var("HOST").unwrap_or_else(|_| "127.0.0.1".to_string());
|
let host = env::var("HOST").unwrap_or_else(|_| "127.0.0.1".to_string());
|
||||||
let port = env::var("PORT").unwrap_or_else(|_| "3000".to_string());
|
let port = env::var("PORT").unwrap_or_else(|_| "3001".to_string());
|
||||||
|
|
||||||
// Create repositories
|
// Create repositories
|
||||||
let user_repo = InMemoryUserRepository::new();
|
let user_repo = InMemoryUserRepository::new();
|
||||||
|
|
|
@ -16,7 +16,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
// Get configuration from environment variables
|
// Get configuration from environment variables
|
||||||
let host = env::var("HOST").unwrap_or_else(|_| "127.0.0.1".to_string());
|
let host = env::var("HOST").unwrap_or_else(|_| "127.0.0.1".to_string());
|
||||||
let port = env::var("PORT").unwrap_or_else(|_| "3000".to_string());
|
let port = env::var("PORT").unwrap_or_else(|_| "3001".to_string());
|
||||||
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||||
|
|
||||||
// Create database pool
|
// Create database pool
|
||||||
|
|
Loading…
Add table
Reference in a new issue