Skip to content

weiraneve/actix-clean-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abstract

This is a clean architecture actix-web project.

apis

See the API documentation pages for more info.

sql

See lottery sql info for more sql info

usages

  1. Create database and tables, you can see it by lottery sql. this can be done in the terminal, then input your mysql root password:

    mysql -u root -p lottery < ./sql/lottery.sql
  2. Create a .env file in this directory:

    SERVER_ADDR=127.0.0.1:8034
    DATABASE_URL=mysql://<username>:<password>@localhost:3306/lottery
  3. Run the server

architecture overview

my actix Onion Architecture:

src
├── api
│   ├── controllers
│   └── dto
├── domain
│   ├── models
│   ├── repositories
│   └── services
├── infrastructure
│   └── repositories
├── services
├── tests
│   └── api
└── main.rs

My ideal architecture in my project would be:

testing support

To run the tests, you can go src/tests and use the following command:

cargo test

About

rust actix clean architecture project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages