Server API v1 #1
@ -1,9 +1,10 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-3.0-Only
|
||||||
|
// Copyright (C) 2024 Luke Harding
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
use actix_web::{App, get, HttpResponse, HttpServer, Responder};
|
use actix_web::{App, get, HttpResponse, HttpServer, Responder};
|
||||||
|
|
||||||
use crate::util::warn_println;
|
|
||||||
|
|
||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
@ -19,7 +20,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
if let Ok(env_port) = env_port.parse::<u16>() {
|
if let Ok(env_port) = env_port.parse::<u16>() {
|
||||||
port = env_port;
|
port = env_port;
|
||||||
} else {
|
} else {
|
||||||
warn_println("Failed to parse PORT env variable using default value.");
|
util::warn_println("Failed to parse PORT env variable using default value.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-3.0-Only
|
||||||
|
// Copyright (C) 2024 Luke Harding
|
||||||
|
|
||||||
use colored::Colorize;
|
use colored::Colorize;
|
||||||
|
|
||||||
pub fn print_copyright_notice() {
|
pub fn print_copyright_notice() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user