// Testserver demo
// Copyright (C) 2021 Soni L.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
static DEMO: &'static str =
r###"!
page.xhtml.t/ 0 0 0 644 724 `
Testserver Demo
Testserver Demo
Simple demo of the testserver. Check the source file for
details.
icon.a/ 0 0 0 644 190 `
!
icon.png.b/ 0 0 0 644 122 `
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAH0lEQVR4nGP4/59hbyPD3L1QtBaG
tsLQThgCKvv/HwAu9hd9OeN5mQAAAABJRU5ErkJggg==
"###;
use testserver::{IP, serve};
fn main() {
let server = serve(DEMO);
println!("Listening on http://{}:{}/page.xhtml", IP, server.port());
println!("Type anything to exit.");
let _ = std::io::stdin().read_line(&mut String::new());
drop(server);
}