comment_app_frontend 0.1.3

A Comment App Front End Server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[deny(warnings)]
use std::net::SocketAddr;
use crate::filters;

#[tokio::main]
pub async fn start(){
    let api = filters::comments();
    let ip_address = super::config("frontend_server_ip_address"); // example: 127.0.0.1:3040
    let cert_path = super::config("cert_path");
    let key_path = super::config("key_path");
    let socket_address: SocketAddr = ip_address.as_str().parse().unwrap(); // parses to a std::net::SocketAddr 
    warp::serve(api)
        .tls()
        .cert_path(cert_path)
        .key_path(key_path)
        .run(socket_address)
        .await;
}