forked from Ruderverein-Donau-Linz/rowt
rename subfolder
This commit is contained in:
parent
509412599f
commit
0fbdcc084e
@ -3,11 +3,13 @@ name = "rot"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
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]
|
[dependencies]
|
||||||
rocket = { version = "0.5.0-rc.3", features = ["secrets"]}
|
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"
|
log = "0.4"
|
||||||
env_logger = "0.10"
|
env_logger = "0.10"
|
||||||
sqlx = { version = "0.6", features = ["sqlite", "runtime-tokio-rustls", "macros", "chrono", "time"] }
|
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 = { version = "1.0", features = [ "derive" ]}
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
chrono = { version = "0.4", features = ["serde"]}
|
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"
|
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 model;
|
||||||
pub mod rest;
|
|
||||||
|
#[cfg(feature = "rowing-tera")]
|
||||||
|
pub mod tera;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use rot::rest;
|
#[cfg(feature = "rowing-tera")]
|
||||||
|
use rot::tera;
|
||||||
use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, ConnectOptions};
|
use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, ConnectOptions};
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
||||||
|
#[cfg(feature = "rowing-tera")]
|
||||||
#[launch]
|
#[launch]
|
||||||
async fn rocket() -> _ {
|
async fn rocket() -> _ {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
//let pool = SqlitePool::connect(":memory:").await.unwrap();
|
|
||||||
let mut connection_options = SqliteConnectOptions::from_str("sqlite://db.sqlite").unwrap();
|
let mut connection_options = SqliteConnectOptions::from_str("sqlite://db.sqlite").unwrap();
|
||||||
connection_options.log_statements(log::LevelFilter::Debug);
|
connection_options.log_statements(log::LevelFilter::Debug);
|
||||||
let pool = PoolOptions::new()
|
let pool = PoolOptions::new()
|
||||||
@ -18,5 +19,5 @@ async fn rocket() -> _ {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
rest::start(pool)
|
tera::start(pool)
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use rocket::{get, routes, Route, State};
|
use rocket::{get, routes, Route, State};
|
||||||
use sqlx::SqlitePool;
|
use sqlx::SqlitePool;
|
||||||
|
|
||||||
use crate::{model::log::Log, rest::Config};
|
use crate::{model::log::Log, tera::Config};
|
||||||
|
|
||||||
pub mod planned_event;
|
pub mod planned_event;
|
||||||
pub mod user;
|
pub mod user;
|
Loading…
x
Reference in New Issue
Block a user