templates now generate relative to cwd
added more examples to conf
This commit is contained in:
parent
25ed4f0acb
commit
5aa57864d7
3 changed files with 5 additions and 4 deletions
|
@ -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")
|
||||
]
|
||||
),
|
||||
]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue