rename subfolder
This commit is contained in:
parent
509412599f
commit
0fbdcc084e
@ -3,11 +3,13 @@ name = "rot"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[features]
|
||||
default = ["rowing-tera"]
|
||||
rowing-tera = ["rocket_dyn_templates", "tera"]
|
||||
|
||||
[dependencies]
|
||||
rocket = { version = "0.5.0-rc.3", features = ["secrets"]}
|
||||
rocket_dyn_templates = {version = "0.1.0-rc.3", features = [ "tera" ] }
|
||||
rocket_dyn_templates = {version = "0.1.0-rc.3", features = [ "tera" ], optional = true }
|
||||
log = "0.4"
|
||||
env_logger = "0.10"
|
||||
sqlx = { version = "0.6", features = ["sqlite", "runtime-tokio-rustls", "macros", "chrono", "time"] }
|
||||
@ -15,5 +17,5 @@ argon2 = "0.5"
|
||||
serde = { version = "1.0", features = [ "derive" ]}
|
||||
serde_json = "1.0"
|
||||
chrono = { version = "0.4", features = ["serde"]}
|
||||
tera = { version = "1.18", features = ["date-locale"]}
|
||||
tera = { version = "1.18", features = ["date-locale"], optional = true}
|
||||
ics = "0.5"
|
||||
|
2
rot_app/src/+layout.js/.ts
Normal file
2
rot_app/src/+layout.js/.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export const prerender = true;
|
||||
|
@ -1,5 +1,7 @@
|
||||
pub mod model;
|
||||
pub mod rest;
|
||||
|
||||
#[cfg(feature = "rowing-tera")]
|
||||
pub mod tera;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_export]
|
||||
|
@ -1,16 +1,17 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use rot::rest;
|
||||
#[cfg(feature = "rowing-tera")]
|
||||
use rot::tera;
|
||||
use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, ConnectOptions};
|
||||
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
|
||||
#[cfg(feature = "rowing-tera")]
|
||||
#[launch]
|
||||
async fn rocket() -> _ {
|
||||
env_logger::init();
|
||||
|
||||
//let pool = SqlitePool::connect(":memory:").await.unwrap();
|
||||
let mut connection_options = SqliteConnectOptions::from_str("sqlite://db.sqlite").unwrap();
|
||||
connection_options.log_statements(log::LevelFilter::Debug);
|
||||
let pool = PoolOptions::new()
|
||||
@ -18,5 +19,5 @@ async fn rocket() -> _ {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
rest::start(pool)
|
||||
tera::start(pool)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use rocket::{get, routes, Route, State};
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
use crate::{model::log::Log, rest::Config};
|
||||
use crate::{model::log::Log, tera::Config};
|
||||
|
||||
pub mod planned_event;
|
||||
pub mod user;
|
Loading…
Reference in New Issue
Block a user