Compare commits

...

3 Commits

5 changed files with 76 additions and 51 deletions
+52
View File
@@ -0,0 +1,52 @@
default: run
run:
cargo run
run-release:
cargo run --release
format:
cargo fmt --all
format-check:
cargo fmt --check --all
audit:
cargo deny check
build:
cargo build
build-release:
cargo build --release
lint:
cargo clippy --all-targets
release-build:
cargo build --release
release-run:
cargo run --release
[env("SQLX_OFFLINE", "1")]
test:
cargo test --all --all-targets
test-hardware:
cargo test --all --all-targets -- --ignored
coverage:
mkdir -p coverage
cargo tarpaulin --config .tarpaulin.local.toml
coverage-ci:
mkdir -p coverage
cargo tarpaulin --config .tarpaulin.ci.toml
check-all: format-check lint coverage audit
## Local Variables:
## mode: makefile
## End:
+2 -2
View File
@@ -8,9 +8,9 @@ rate_limit:
per_seconds: 60 per_seconds: 60
modbus: modbus:
host: 192.168.0.200 host: 192.168.1.200
port: 502 port: 502
slave_id: 0 slave_id: 1
timeout_secs: 5 timeout_secs: 5
relay: relay:
+2
View File
@@ -59,8 +59,10 @@ impl From<CorsSettings> for Cors {
); );
let mut cors = Self::new(); let mut cors = Self::new();
for origin in &val.allowed_origins { for origin in &val.allowed_origins {
if origin != "*" {
cors = cors.allow_origin(origin); cors = cors.allow_origin(origin);
} }
}
cors = cors.allow_methods(vec![ cors = cors.allow_methods(vec![
Method::GET, Method::GET,
Method::POST, Method::POST,
+17
View File
@@ -0,0 +1,17 @@
default: run
run:
pnpm run dev
build:
pnpm run build
preview:
pnpm run preview
sync:
pnpm run "generate:api"
## Local Variables:
## mode: makefile
## End:
+2 -48
View File
@@ -1,51 +1,5 @@
default: run mod backend
mod frontend
run:
cargo run
run-release:
cargo run --release
format:
cargo fmt --all
format-check:
cargo fmt --check --all
audit:
cargo deny check
build:
cargo build
build-release:
cargo build --release
lint:
cargo clippy --all-targets
release-build:
cargo build --release
release-run:
cargo run --release
[env("SQLX_OFFLINE", "1")]
test:
cargo test --all --all-targets
test-hardware:
cargo test --all --all-targets -- --ignored
coverage:
mkdir -p coverage
cargo tarpaulin --config backend/.tarpaulin.local.toml
coverage-ci:
mkdir -p coverage
cargo tarpaulin --config backend/.tarpaulin.ci.toml
check-all: format-check lint coverage audit
## Local Variables: ## Local Variables:
## mode: makefile ## mode: makefile