html terminal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![feature(lazy_cell, let_chains, iter_intersperse)]
use std::str::FromStr;
#[macro_use]
mod logging;
mod bot;
mod process;
mod server;
mod webhook;

use server::*;
use std::net::SocketAddr;

#[tokio::main(flavor = "current_thread")]
async fn main() {
    Server::spawn(SocketAddr::from((
        [0, 0, 0, 0],
        std::env::var("PORT").map_or(4001, |x| u16::from_str(&x).unwrap()),
    )))
    .await;
}