Add dependencies

This commit is contained in:
fernando 2024-02-13 10:28:30 -05:00
parent ac416e9517
commit 7f42e04494
8 changed files with 20 additions and 4 deletions

12
Cargo.lock generated
View File

@ -351,6 +351,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"maud", "maud",
"rocket", "rocket",
"rocket_session",
"serde", "serde",
"sqlx", "sqlx",
] ]
@ -1429,6 +1430,17 @@ dependencies = [
"uncased", "uncased",
] ]
[[package]]
name = "rocket_session"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a1a0f6637aba596ac1975584479638b9350d54187f4c745584d046b3dd1ea6f"
dependencies = [
"parking_lot",
"rand",
"rocket",
]
[[package]] [[package]]
name = "rsa" name = "rsa"
version = "0.9.6" version = "0.9.6"

View File

@ -8,5 +8,6 @@ edition = "2021"
[dependencies] [dependencies]
maud = { version = "0.26.0", features = ["rocket"] } maud = { version = "0.26.0", features = ["rocket"] }
rocket = "0.5.0" rocket = "0.5.0"
rocket_session = "0.3.0"
serde = "1.0.196" serde = "1.0.196"
sqlx = { version = "0.7.3", features = ["postgres"] } sqlx = { version = "0.7.3", features = ["postgres"] }

View File

@ -1,9 +1,9 @@
-- PostgreSQL schema for the database -- MySQL schema for the database
-- User table -- User table
CREATE TABLE user ( CREATE TABLE user (
user_id SERIAL PRIMARY KEY, user_id INT PRIMARY KEY AUTO_INCREMENT,
user_email VARCHAR(50) NOT NULL, user_email VARCHAR(50) NOT NULL,
user_password VARCHAR(255) NOT NULL, user_password VARCHAR(255) NOT NULL,
user_names VARCHAR(50) NOT NULL, user_names VARCHAR(50) NOT NULL,

View File

@ -2,6 +2,7 @@ use rocket::fs::FileServer;
mod controller; mod controller;
mod view; mod view;
mod model;
#[macro_use] #[macro_use]
extern crate rocket; extern crate rocket;

0
src/model/mod.rs Normal file
View File

View File

View File

@ -1,5 +1,7 @@
use maud::{html, Markup, DOCTYPE}; use maud::{html, Markup, DOCTYPE};
mod fragments;
#[get("/")] #[get("/")]
pub fn index() -> Markup { pub fn index() -> Markup {
html! { html! {

View File

@ -9,7 +9,7 @@
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
:root { :root {
--c-bg: #fafaf0; --c-bg: #f8f8fa;
--c-on-bg: #101010; --c-on-bg: #101010;
} }
} }