Api url 2493#2510
Conversation
…alue on src/api/call.js
…placment for REACT_APP_POLICYENGINE_API
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| headers: { | ||
| "Content-Type": "application/json", | ||
| return fetchMethod( | ||
| process.env.REACT_APP_POLICYENGINE_API || |
There was a problem hiding this comment.
question: Would it be more advantageous to set the POLICYENGINE_API constant as either the env var or standard address, then use that constant in the fetch method?
This would enable other components, as needed, to import the constant
anth-volk
left a comment
There was a problem hiding this comment.
Thanks for your work on this @fudgemasterultra. Apologies for the delay in review, I was unavailable last week for work-related reasons.
I left one comment. Would you mind following our README guide to creating a PR (including adding a "Fixes #ISSUE" line) and addressing my one comment? Otherwise, this will be really valuable to have.
|
@sreeshanth-soma You are not a repo or org maintainer. Do not provide review unless a repo or org explicitly says they welcome reviews from read-only reviewers. Review is traditionally done by maintainers. |
Environment Configuration and API Setup
What Changed
.env.examplefile as a template for environment configuration.envto.gitignoreto prevent committing configuration.env.exampleto.envapiCallfunction to use environment variables with a fallback URLWhy This Change
Technical Details
cp .env.example .envcommand to Makefile for easy environment setupprocess.env.REACT_APP_POLICYENGINE_API || "https://api.policyengine.org".envfile is ignored in version control