From 5fd2833719bb0a8c87b38c1419ea92029a7e4d81 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sat, 12 Jun 2021 19:18:15 -0300 Subject: Add demo --- src/bin/testserver-demo.rs | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/bin/testserver-demo.rs diff --git a/src/bin/testserver-demo.rs b/src/bin/testserver-demo.rs new file mode 100644 index 0000000..74ea752 --- /dev/null +++ b/src/bin/testserver-demo.rs @@ -0,0 +1,49 @@ +// 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 663 ` + + + + + + + Testserver Demo + + +
+

Testserver Demo

+

Simple demo of the testserver. Check the source file for details.

+
+ + + + + +"###; + +fn main() { + let server = testserver::serve(DEMO); + println!("Listening on http://127.74.137.226:{}/page.xhtml", server.port()); + println!("Type anything to exit."); + let _ = std::io::stdin().read_line(&mut String::new()); + drop(server); +} -- cgit v1.2.3