Logo

dev-resources.site

for different kinds of informations.

πŸ“’Stop adding API_KEY to tutorials. Do this...

Published at
2/21/2023
Categories
api
tutorial
coding
webdev
Author
Ayobami Ogundiran
Categories
4 categories in total
api
open
tutorial
open
coding
open
webdev
open
πŸ“’Stop adding API_KEY to tutorials. Do this...

There are so many tutorials out there that add API_KEY to code.

And some other people now use their keys. Don't do that again.

πŸ“’ Do this instead πŸ‘‡

const API_NAME = "myAPI";
const API_KEY = prompt ("Enter your API_KEY:");

This gives you the chance to test your code and learners can create their API_KEY to test it.

Note: This is only for the browser πŸ‘‹.

You can further explain the normal way to do it and why you do it that way not to confuse learners.

Thank me later 🀩.

Featured ones: