templates now generate relative to cwd

added more examples to conf
master
Edward Shen 2019-05-01 23:47:05 -04:00
parent 25ed4f0acb
commit 5aa57864d7
Signed by: edward
GPG Key ID: F350507060ED6C90
3 changed files with 5 additions and 4 deletions

View File

@ -24,8 +24,9 @@
label: "Even more stuff!",
endpoints: [
(label: "Or expect different reponse codes (like 418)", endpoint: "http://error418.net/", code: 418),
(label: "Or bodies!", endpoint: "http://urlecho.appspot.com/echo", body: "None"),
(label: "Or response checking!", endpoint: "http://urlecho.appspot.com/echo", body: "None"),
(label: "Or both!", endpoint: "http://urlecho.appspot.com/echo?status=503&Content-Type=text%2Fhtml&body=None", body: "None", code: 503),
(label: "Or expect the endpoint to fail entirely!", endpoint: "http://lol.arpa", should_err: true),
],
),
(
@ -33,7 +34,7 @@
endpoints:[
(label: "The code doesn't match!", endpoint: "http://example.com/", code: 204),
(label: "The body doesn't match!", endpoint: "http://example.com/", body: "asdf"),
(label: "Here's an error", endpoint: "https://some-invalid-website.arpa")
(label: "Here's an error:", endpoint: "https://some-invalid-website.arpa")
]
),
]

View File

@ -51,7 +51,7 @@ fn main() {
let clone_state = Arc::clone(&state);
HttpServer::new(move || {
let tera = compile_templates!(concat!(env!("CARGO_MANIFEST_DIR"), "/templates/**/*"));
let tera = compile_templates!("./templates/**/*");
let state = Arc::clone(&state);
App::new()

View File

@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Endstat</title>
<title>endstat</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:200|Source+Code+Pro:400" rel="stylesheet">
<style>
body {