Skip to content

bkmsx/pg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Export environment variables from .env file and connect to PostgreSQL
set -a
source .env
set +a

# Seed the database with initial data
psql -U $PGUSER -d $PGDATABASE -h $PGHOST -f ./ecommerce/seed.sql

# Connect to PostgreSQL using the environment variables
export PGPASSWORD_ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$PGPASSWORD', safe=''))")
export URI="postgresql://$PGUSER:$PGPASSWORD_ENCODED@$PGHOST:5432/$PGDATABASE"
psql $URI

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages