Skip to content

j-awada/happeningnu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Happening nu

Coming soon.

Project setup history

$ rustc --version
#rustc 1.91.1 (ed61e7d7e 2025-11-07)

$ rustup --version
#rustup 1.28.2 (e4f3ad6f8 2025-04-28)
#info: This is the version for the rustup toolchain manager, not the rustc compiler.
#info: The currently active `rustc` version is `rustc 1.91.1 (ed61e7d7e 2025-11-07)`
cargo init --name happeningnu

cargo add axum
cargo add tokio --features full
cargo add tower
cargo add tower_http -F trace
cargo add tower_http -F fs
cargo add hyper
cargo add serde --features derive
cargo add tera
cargo add sea-orm --features sqlx-sqlite,runtime-tokio-rustls,macros,with-chrono,with-uuid
cargo install sea-orm-cli
cargo add sea-orm-migration --features sqlx-sqlite
cargo add dotenvy
cargo add validator -F derive
cargo add time
cargo add axum-messages
cargo add tower-sessions
cargo add tower-sessions-sqlx-store -F sqlite
cargo add argon2
cargo add chrono
cargo add serde_json
brew install cargo-watch
cargo watch -x run

Database setup

# Initialise migrations folder (done once)
sea-orm-cli migrate init

# Generate migrations (optional)
sea-orm-cli migrate generate create_initial_schema

# Edit migrations file

# You have to manually add "sqlx-sqlite" and "runtime-tokio-rustls" to the sea-orm-migration features in toml under migration/

# Create the db.sqlite file in the root directory

# Run migrations to create tables
sea-orm-cli migrate up -u sqlite://db.sqlite

# Check tables in the database
sqlite3 db.sqlite
.tables
.schema users
.quit

# Generate entities
# Those are used as an ORM to interact with the database
sea-orm-cli generate entity -u sqlite://db.sqlite -o src/entities

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors