Skip to content

Database URL should be stored in environment variables, not hardcoded #2

Description

@hatemhenchir

The current implementation of the Xata client hardcodes the databaseURL:

const defaultOptions = { databaseURL: "https://..............................", apiKey: process.env.XATA_API_KEY, branch: "main", };

This is problematic because:

  • It leaks workspace details publicly.
  • It reduces flexibility for different environments (development, staging, production).
  • It violates best practices for managing secrets and config values.

Use an environment variable instead to store the database url

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions