Skip to content

Commit

Permalink
chore: extract db-url
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Jan 14, 2024
1 parent 2b7fc5a commit a771651
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export CFLAGS := ""

DB_URL := "postgres://postgres:postgres@localhost/moksha-mint"

# list all tasks
default:
Expand Down Expand Up @@ -123,12 +124,12 @@ build-wasm:
# runs sqlx prepare
db-prepare:
cd moksha-mint && \
cargo sqlx prepare --database-url postgres://postgres:postgres@127.0.0.1/moksha-mint
cargo sqlx prepare --database-url {{ DB_URL }}

# creates the postgres database
db-create:
cd moksha-mint && \
cargo sqlx database create --database-url postgres://postgres:postgres@localhost/moksha-mint
cargo sqlx database create --database-url {{ DB_URL }}

# starts the fly.io database proxy
start-fly-proxy:
Expand Down

0 comments on commit a771651

Please sign in to comment.