Skip to content

Commit

Permalink
Updated local testing in README
Browse files Browse the repository at this point in the history
  • Loading branch information
bqd39 committed Jul 29, 2024
1 parent 57121c3 commit ca28163
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 10 additions & 0 deletions examples/dash/dash-connect-pgsql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ Run `python -m pip install -r requirements.txt` to install all necessary package
Run `python upload.py` locally to upload the datasets to your PostgreSQL.

## Local testing
Add the below lines to your `app.py`
```python
from dotenv import load_dotenv

# Load environment variables
load_dotenv(".env")
```

You can remove them once you are done with local testing.

Run `python app.py`. You should be able to access the app on your localhost at port 8000.

## Upload to Ploomber Cloud
Expand Down
4 changes: 0 additions & 4 deletions examples/dash/dash-connect-pgsql/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import pandas as pd
from sqlalchemy import URL, create_engine
import os
from dotenv import load_dotenv # Remove this line once you are done with local teting

# Load environment variables
load_dotenv(".env") # Remove this line once you are done with local teting

# Connect to PostgreSQL database
connection_string = URL.create(
Expand Down

0 comments on commit ca28163

Please sign in to comment.