DEV Community

Discussion on: How To Write a Search Component with Suggestions in React

Collapse
 
fabriciohendrix profile image
Fabrício Santos

Hey Stefan, How and where can I use my API_KEY ?

Collapse
 
saaage profile image
Stefan Age

Hi Fabricio,

You can define your API KEY in your shell instance by running the command:
$ export MGRPH_KEY=yourAPIkey. Just make sure to start the app in the same window.

You can also utilize a .env file.

Lastly, you can add it as part of your start script for example

package.json

"scripts":  {
    "start": "MGRPH_KEY=yourAPI-KEY react-scripts start"
}
Collapse
 
plaidsanne profile image
Plaidsanne

Hello,

musicgraph seems to be down and not responsive when testing API's. I was wondering is this the case for you as well.