[Chore] API can't use Azure PG locally due to .env issue
dfberry opened this issue · comments
Are you accessing the project from the GitHub Codespaces?
- No, I am running the project on my local machine (I will fill in the OS section below)
- [x ] Yes, I am using GitHub Codespaces.
Note: The project is optimized to run on Codespaces. We welcome contributions to enhance it for cross-platform local development, but it's not something we will prioritize right now. Thank you!
Describe the bug
The API package incorrectly uses the local .env file.
To Reproduce
Steps to reproduce the behavior:
- Provision resources:
azd provision
- Create local env file from /packages/api:
npm run env
which creates a .env file - From root, start API:
npm run start:api
- Try to get listings:
https://CodespacesURL/api/listings
- Get error about getting refused from postgres (local db)
Expected behavior
Local development successfully connects to Azure Postgres
OS (please complete the following information):
- OS:
- OS Version:
- npm version:
- Node.js version:
- output of
azd version
:
Additional context
Add any other context about the problem here.
We are currently only supporting local development env variables. Would you like to work (or have you worked) on adding support ?
Closed due to inactivity.