Skip to content

Commit

Permalink
docs: Don't require db-sql in leptos examples (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencewenski authored Oct 20, 2024
1 parent 8e47644 commit 4c7ab4c
Show file tree
Hide file tree
Showing 20 changed files with 2 additions and 242 deletions.
8 changes: 1 addition & 7 deletions examples/leptos-0.7-ssr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ hydrate = [
]
ssr = [
"dep:roadster",
"dep:leptos-7-example-entity",
"dep:leptos-7-example-migration",
"dep:axum",
"dep:tokio",
"dep:tokio-util",
Expand All @@ -27,7 +25,7 @@ ssr = [
]

[dependencies]
roadster = { version = "0.6", path = "../..", optional = true, default-features = false, features = ["http", "db-sql", "cli"] }
roadster = { version = "0.6", path = "../..", optional = true, default-features = false, features = ["http", "cli"] }
tokio = { workspace = true, optional = true }
tokio-util = { workspace = true, optional = true }
anyhow = { workspace = true }
Expand All @@ -38,10 +36,6 @@ clap = { workspace = true }
# Http API
axum = { workspace = true, optional = true }

# DB
leptos-7-example-entity = { path = "entity", optional = true }
leptos-7-example-migration = { path = "migration", optional = true }

serde = { workspace = true, features = ["derive"] }

# Leptos
Expand Down
3 changes: 0 additions & 3 deletions examples/leptos-0.7-ssr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ Feel free to explore the project structure, but the best place to start with you
## Running your project

```bash
# Start the database and redis (for sidekiq). Note: change the credentials when deploying to prod
docker run -d -p 5432:5432 -e POSTGRES_USER=roadster -e POSTGRES_DB=example_dev -e POSTGRES_PASSWORD=roadster postgres:15.3-alpine
docker run -d -p 6379:6379 redis:7.2-alpine
# From the root Roadster directory, cd into the example dir
cd examples/leptos-ssr
# Run the app
Expand Down
12 changes: 0 additions & 12 deletions examples/leptos-0.7-ssr/entity/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion examples/leptos-0.7-ssr/entity/src/lib.rs

This file was deleted.

22 changes: 0 additions & 22 deletions examples/leptos-0.7-ssr/migration/Cargo.toml

This file was deleted.

41 changes: 0 additions & 41 deletions examples/leptos-0.7-ssr/migration/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions examples/leptos-0.7-ssr/migration/src/lib.rs

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions examples/leptos-0.7-ssr/migration/src/main.rs

This file was deleted.

2 changes: 0 additions & 2 deletions examples/leptos-0.7-ssr/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use async_trait::async_trait;
use axum::Router;
use leptos::prelude::*;
use leptos_axum::{generate_route_list, LeptosRoutes};
use migration::Migrator;
use roadster::app::context::AppContext;
use roadster::app::metadata::AppMetadata;
use roadster::app::App as RoadsterApp;
Expand All @@ -23,7 +22,6 @@ pub struct Server;
#[async_trait]
impl RoadsterApp<AppState> for Server {
type Cli = crate::cli::AppCli;
type M = Migrator;

fn metadata(&self, _config: &AppConfig) -> RoadsterResult<AppMetadata> {
Ok(AppMetadata::builder()
Expand Down
8 changes: 1 addition & 7 deletions examples/leptos-ssr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ publish = false
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"]
ssr = [
"dep:roadster",
"dep:leptos-example-entity",
"dep:leptos-example-migration",
"dep:axum",
"dep:tokio",
"dep:tokio-util",
Expand All @@ -25,7 +23,7 @@ ssr = [
]

[dependencies]
roadster = { version = "0.6", path = "../..", optional = true, default-features = false, features = ["http", "db-sql", "cli"] }
roadster = { version = "0.6", path = "../..", optional = true, default-features = false, features = ["http", "cli"] }
tokio = { workspace = true, optional = true }
tokio-util = { workspace = true, optional = true }
anyhow = { workspace = true }
Expand All @@ -36,10 +34,6 @@ clap = { workspace = true }
# Http API
axum = { workspace = true, optional = true }

# DB
leptos-example-entity = { path = "entity", optional = true }
leptos-example-migration = { path = "migration", optional = true }

serde = { workspace = true, features = ["derive"] }

# Leptos
Expand Down
3 changes: 0 additions & 3 deletions examples/leptos-ssr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ Feel free to explore the project structure, but the best place to start with you
## Running your project

```bash
# Start the database and redis (for sidekiq). Note: change the credentials when deploying to prod
docker run -d -p 5432:5432 -e POSTGRES_USER=roadster -e POSTGRES_DB=example_dev -e POSTGRES_PASSWORD=roadster postgres:15.3-alpine
docker run -d -p 6379:6379 redis:7.2-alpine
# From the root Roadster directory, cd into the example dir
cd examples/leptos-ssr
# Run the app
Expand Down
12 changes: 0 additions & 12 deletions examples/leptos-ssr/entity/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion examples/leptos-ssr/entity/src/lib.rs

This file was deleted.

22 changes: 0 additions & 22 deletions examples/leptos-ssr/migration/Cargo.toml

This file was deleted.

41 changes: 0 additions & 41 deletions examples/leptos-ssr/migration/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions examples/leptos-ssr/migration/src/lib.rs

This file was deleted.

15 changes: 0 additions & 15 deletions examples/leptos-ssr/migration/src/m20220101_000001_create_table.rs

This file was deleted.

6 changes: 0 additions & 6 deletions examples/leptos-ssr/migration/src/main.rs

This file was deleted.

2 changes: 0 additions & 2 deletions examples/leptos-ssr/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use axum::Router;
use leptos::get_configuration;
use leptos_axum::{generate_route_list, LeptosRoutes};
use leptos_config::{ConfFile, Env};
use migration::Migrator;
use roadster::app::context::AppContext;
use roadster::app::metadata::AppMetadata;
use roadster::app::App as RoadsterApp;
Expand All @@ -28,7 +27,6 @@ pub struct Server;
#[async_trait]
impl RoadsterApp<AppState> for Server {
type Cli = crate::cli::AppCli;
type M = Migrator;

fn metadata(&self, _config: &AppConfig) -> RoadsterResult<AppMetadata> {
Ok(AppMetadata::builder()
Expand Down

0 comments on commit 4c7ab4c

Please sign in to comment.