Skip to content

Commit

Permalink
Update DATABASE_URL for local dev; use env var in spec
Browse files Browse the repository at this point in the history
Updated DATABASE_URL in the .env file to use localhost instead of postgres for improved compatibility in local development environments. Also modified the record_spec to refer to the DATABASE_URL environment variable, enabling flexible and centralized configuration management.
  • Loading branch information
eliasjpr committed Aug 13, 2024
1 parent 5667c09 commit 6939914
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DATABASE_URL=postgres://example:example@postgres:5432/example
DATABASE_URL=postgres://example:example@localhost:5432/example
2 changes: 1 addition & 1 deletion spec/record_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require "./spec_helper"
AcmeDB = Cql::Schema.build(
:acme_db,
adapter: Cql::Adapter::Postgres,
uri: "postgresql://example:example@localhost:5432/example") do
uri: ENV["DATABASE_URL"]) do
table :posts do
primary :id, Int64, auto_increment: true
text :title
Expand Down

0 comments on commit 6939914

Please sign in to comment.