Compare commits
No commits in common. "560297ad880527f1a3b11101e467ef18ea450eb8" and "afc03bb722ca87746f03c62baf5bd83bfece8632" have entirely different histories.
560297ad88
...
afc03bb722
17
back/Cargo.lock
generated
17
back/Cargo.lock
generated
|
@ -939,7 +939,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower-http",
|
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1576,22 +1575,6 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tower-http"
|
|
||||||
version = "0.5.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.6.0",
|
|
||||||
"bytes",
|
|
||||||
"http",
|
|
||||||
"http-body",
|
|
||||||
"http-body-util",
|
|
||||||
"pin-project-lite",
|
|
||||||
"tower-layer",
|
|
||||||
"tower-service",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-layer"
|
name = "tower-layer"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
|
|
|
@ -8,5 +8,4 @@ axum = "0.7.5"
|
||||||
serde = "1.0.204"
|
serde = "1.0.204"
|
||||||
sqlx = { version = "0.7.4", features = ["runtime-tokio", "sqlite"] }
|
sqlx = { version = "0.7.4", features = ["runtime-tokio", "sqlite"] }
|
||||||
tokio = { version = "1.38.1", features = ["rt-multi-thread", "macros", "net", "time", "sync"] }
|
tokio = { version = "1.38.1", features = ["rt-multi-thread", "macros", "net", "time", "sync"] }
|
||||||
tower-http = { version = "0.5.2", features = ["cors"] }
|
|
||||||
tracing-subscriber = "0.3.18"
|
tracing-subscriber = "0.3.18"
|
||||||
|
|
|
@ -3,7 +3,6 @@ use std::str::FromStr;
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::State, http::StatusCode, routing::post, Json, Router
|
extract::State, http::StatusCode, routing::post, Json, Router
|
||||||
};
|
};
|
||||||
use tower_http::cors::CorsLayer;
|
|
||||||
|
|
||||||
use sqlx::{Row, sqlite::{SqliteConnectOptions, SqlitePoolOptions}, Pool, Sqlite};
|
use sqlx::{Row, sqlite::{SqliteConnectOptions, SqlitePoolOptions}, Pool, Sqlite};
|
||||||
|
|
||||||
|
@ -49,7 +48,6 @@ async fn main() {
|
||||||
.route("/api/echo", post(echo))
|
.route("/api/echo", post(echo))
|
||||||
.route("/api/get_counter", post(get_counter))
|
.route("/api/get_counter", post(get_counter))
|
||||||
.route("/api/set_counter", post(set_counter))
|
.route("/api/set_counter", post(set_counter))
|
||||||
.layer(CorsLayer::permissive())
|
|
||||||
.with_state(state);
|
.with_state(state);
|
||||||
|
|
||||||
axum::serve(listener, app)
|
axum::serve(listener, app)
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
backend = platform.buildRustPackage {
|
backend = platform.buildRustPackage {
|
||||||
name = "plantback";
|
name = "plantback";
|
||||||
src = ./back;
|
src = ./back;
|
||||||
cargoLock = { lockFile = ./back/Cargo.lock; };
|
cargoLock = { lockFile = ./front/Cargo.lock; };
|
||||||
};
|
};
|
||||||
frontend = pkgs.buildNpmPackage {
|
frontend = pkgs.buildNpmPackage {
|
||||||
name = "plantfront";
|
name = "plantfront";
|
||||||
src = ./front;
|
src = ./front;
|
||||||
nodejs = node;
|
nodejs = node;
|
||||||
npmBuildScript = "build-only";
|
npmBuildScript = "build-only";
|
||||||
npmDepsHash = "sha256-0BTgt0zjKa6NPEAPyqJEkej0LuhglKpx645JpVSE2Ag=";
|
npmDepsHash = "sha256-QYmO99RkdhAN+vNOkBqeXYlfyHGyHfRKVVMIWYfZO1A=";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mv ./dist $out
|
mv ./dist $out
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user