Skip to content

An async Rust HTTP backend with Actix-Web, sea-orm using Clean Architecture design patterns

License

Notifications You must be signed in to change notification settings

s373r/2023-test-assignment-an-adtech-company

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dima Pristupa: test assignment for an adtech company

About

Quick start

# Run the application
cp .env.example .env 
docker compose -f ./docker/db.yml --env-file ./docker/.env.db  up
cargo run --release # or `just start-prod`

# Call the run endpoint
curl localhost:8080/api/v1/run -v # or `just call-run`

# Get all request group entities
curl -u "api_user:not_qwerty_password" localhost:8080/api/v1/request_group/ -v
# Get all request entities
curl -u "api_user:not_qwerty_password" localhost:8080/api/v1/request/ -v

Tip: you can use the admin panel to view tables via http://localhost:9000

# Run all tests (unit & integration)
cargo test --features integration_tests # or `just test`

Local development

Additional dependencies:

$ just

🔧 Available commands:
   · start-prod         # Start the application (release build)
   · start              # Start the application (debug build)
   · start-watch        # Start the application (and watch for changes)
   · migrator_cli *ARGS # Run migrator_cli (check `just migrator_cli --help`)
   · test               # Run all tests (unit & integration)
   · test-watch         # Run all tests (and watch for changes)
   · format             # Format code
   · lint               # Run a linter
   · call-run           # Call /run endpoint

# Example
$ just start-watch

Ideas for improvement

About

An async Rust HTTP backend with Actix-Web, sea-orm using Clean Architecture design patterns

Topics

Resources

License

Stars

Watchers

Forks