boundless-grass-48932
12/27/2022, 2:29 PMtoml
[dependencies]
shuttle-service = { version = "0.8.0" }
shuttle-shared-db = { version = "0.8.0", features = ["postgres"] }
dotenv = "0.15.0"
sqlx = { version = "0.6.2", features = [
"runtime-tokio-native-tls",
"postgres",
] }
And this is the code from lib.rs:
rust
use main_service::MainService;
pub mod credentials;
pub mod db_service;
pub mod main_service;
async fn init(
#[shuttle_shared_db::Postgres] pool: sqlx::PgPool,
) -> Result<MainService, shuttle_service::Error> {
let main_service = MainService::new(pool)?;
Ok(main_service)
}
It doesn't seem to recognize the #[shuttle_shared_db::Postgres] macro, any ideas?worried-airplane-91571
12/27/2022, 3:40 PMworried-airplane-91571
12/27/2022, 3:42 PM#[shuttle_service::main] on top of your init function.boundless-grass-48932
12/27/2022, 3:42 PMboundless-grass-48932
12/27/2022, 3:42 PMworried-airplane-91571
12/27/2022, 3:42 PMboundless-grass-48932
12/27/2022, 3:43 PMworried-airplane-91571
12/27/2022, 3:43 PMboundless-grass-48932
12/27/2022, 3:43 PMworried-airplane-91571
12/27/2022, 3:44 PM