Browse Source

moved templates into own dir

master
Edward Shen 3 years ago
parent
commit
443dca2841
Signed by: edward
GPG Key ID: F350507060ED6C90
  1. 1
      Dockerfile
  2. 6
      src/main.rs
  3. 0
      templates/index.html

1
Dockerfile

@ -20,6 +20,7 @@ WORKDIR /app
COPY --from=builder /app/target/release/endstat /app
COPY ./config /app/config
COPY ./templates /app/templates
RUN mv /app/config/endstat_conf.example.ron /app/config/endstat_conf.ron
EXPOSE 8080

6
src/main.rs

@ -14,10 +14,10 @@ extern crate ring;
mod config;
mod handlers;
mod updater;
mod results;
mod updater;
use self::{config::*, handlers::*, updater::*, results::QueryResults};
use self::{config::*, handlers::*, results::QueryResults, updater::*};
use actix::System;
use actix_web::{middleware::Logger, web::resource, App, HttpServer};
use ron::de::from_str;
@ -51,7 +51,7 @@ fn main() {
let clone_state = Arc::clone(&state);
HttpServer::new(move || {
let tera = compile_templates!("./config/templates/**/*");
let tera = compile_templates!("./templates/**/*");
let state = Arc::clone(&state);
App::new()

0
config/templates/index.html → templates/index.html

Loading…
Cancel
Save