Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.09 KB

README.md

File metadata and controls

35 lines (28 loc) · 1.09 KB

projektgrupp17-iot-backend

Collects data from iot devices Implemented in rust with rocket

Rust

Docs

Build

  • switch to nightly "rustup override set nightly"
  • cargo run|build to run or build

Test

Unittests, must not run in single thread.

cargo test --tests unittest

Integration tests, must run in single thread

cargo test --tests integrationtest -- --test-threads=1

endpoints

See documentation

Environment

  • RUST_IOT_ENVIRONMENT: PRODUCTION|TEST

production

  • SQL_USERNAME: username for database
  • SQL_PASSWORD: password for database
  • SQL_HOST: mysql host
  • SQL_DB_NAME: database name

test

  • SQL_USERNAME_TEST: username for test database
  • SQL_PASSWORD_TEST: password for test database
  • SQL_HOST_TEST: mysql test host
  • SQL_DB_NAME_TEST: test database name