Skip to content

selatotal/actix-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actix-poc

Microservice using Actix/Diesel

Configure Diesel

  • Configure Diesel client and create initial database
sudo apt install libpq-dev libmysqlclient-dev libsqlite3-dev
cargo install diesel_cli
echo DATABASE_URL="mysql://user:password@example.com/actix-poc" > .env
diesel setup
  • Running migration
diesel migration run

How to Run

cargo run

Endpoints

Import the Postman Collection

References

Documentation

  • Actix: Rust's powerful actor system and most fun web framework
  • Diesel: Diesel is a Safe, Extensible ORM and Query Builder for Rust

Crates

  • actix-rt: Actix runtime
  • actix-web: Actix web framework is simple, pragmatic, extremely fast, and for Rust.
  • diesel: A safe, extensible ORM and Query Builder for Rust
  • dotenv: Storing configuration in the environment using .env files
  • pretty_env_logger A simple logger built on top off env_logger. It is configured via an environment variable and writes to standard error with nice colored output for log levels.
  • log: A Rust library providing a lightweight logging facade.
  • serde: Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.
  • serde_json: Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.
  • uuid: Generate and parse UUIDs.

Releases

No releases published

Packages

No packages published