Quiet html5ever, shuffle servers, mobile scaling

This commit is contained in:
asonix 2020-03-26 11:17:59 -05:00
parent bcfe8b14a3
commit d445177c69
3 changed files with 6 additions and 3 deletions

View file

@ -35,7 +35,7 @@ async fn main() -> Result<(), anyhow::Error> {
if config.debug() {
std::env::set_var(
"RUST_LOG",
"debug,tokio_postgres=info,h2=info,trust_dns_resolver=info,trust_dns_proto=info,rustls=info",
"debug,tokio_postgres=info,h2=info,trust_dns_resolver=info,trust_dns_proto=info,rustls=info,html5ever=info",
)
} else {
std::env::set_var("RUST_LOG", "info")

View file

@ -1,13 +1,15 @@
use crate::{config::Config, data::State, error::MyError};
use actix_web::{web, HttpResponse};
use log::error;
use rand::{seq::SliceRandom, thread_rng};
use std::io::BufWriter;
pub async fn route(
state: web::Data<State>,
config: web::Data<Config>,
) -> Result<HttpResponse, MyError> {
let nodes = state.node_cache().nodes().await;
let mut nodes = state.node_cache().nodes().await;
nodes.shuffle(&mut thread_rng());
let mut buf = BufWriter::new(Vec::new());
crate::templates::index(&mut buf, &nodes, &config)?;

View file

@ -9,7 +9,8 @@
<!doctype html>
<html>
<head lang="en">
<meta charset="utf-8"/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@config.hostname() | ActivityPub Relay</title>
<link rel="stylesheet" href="/static/@index_css.name" type="text/css" />
</head>