helper.rs 675 B

1234567891011121314151617181920
  1. use dotenv::dotenv;
  2. use flowy_server::supabase::SupabaseConfiguration;
  3. /// In order to run this test, you need to create a .env file in the root directory of this project
  4. /// and add the following environment variables:
  5. /// - SUPABASE_URL
  6. /// - SUPABASE_ANON_KEY
  7. /// - SUPABASE_KEY
  8. /// - SUPABASE_JWT_SECRET
  9. ///
  10. /// the .env file should look like this:
  11. /// SUPABASE_URL=https://<your-supabase-url>.supabase.co
  12. /// SUPABASE_ANON_KEY=<your-supabase-anon-key>
  13. /// SUPABASE_KEY=<your-supabase-key>
  14. /// SUPABASE_JWT_SECRET=<your-supabase-jwt-secret>
  15. ///
  16. pub fn get_supabase_config() -> Option<SupabaseConfiguration> {
  17. dotenv().ok()?;
  18. SupabaseConfiguration::from_env().ok()
  19. }