Initial commit
This commit is contained in:
commit
dccfa2d4cf
19 changed files with 3156 additions and 0 deletions
19
app/src/main.rs
Normal file
19
app/src/main.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let pool = Arc::new(
|
||||
SqlitePool::connect("sqlite:./localdb.sqlite3")
|
||||
.await
|
||||
.expect("Could not connect to database"),
|
||||
);
|
||||
let hello_dao = dao_impl::HelloDaoImpl::new(pool.clone());
|
||||
let permission_dao = dao_impl::PermissionDaoImpl::new(pool);
|
||||
|
||||
let permission_service = service_impl::PermissionServiceImpl::new(permission_dao.into());
|
||||
let hello_service =
|
||||
service_impl::HelloServiceImpl::new(hello_dao.into(), permission_service.into());
|
||||
rest::start_server(hello_service).await
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue