Skip to content

Commit

Permalink
Added .env for RapidAPI key
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhoycodes committed Nov 12, 2024
1 parent 662b506 commit b16249c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env
2 changes: 1 addition & 1 deletion src/components/TextToImageGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const TextToImageGenerator = () => {
method: 'POST', // HTTP method
url: 'https://ai-image-generator3.p.rapidapi.com/generate', // API endpoint
headers: {
'x-rapidapi-key': ' b7d718cc59msh784bc7993d213edp1bd4e7jsnc31a912a13ce', // API key
'X-Rapidapi-Key': process.env.REACT_APP_RAPIDAPI_KEY,
'x-rapidapi-host': 'ai-image-generator3.p.rapidapi.com', // API host
'Content-Type': 'application/json' // Content type of the request
},
Expand Down

0 comments on commit b16249c

Please sign in to comment.