paint-brush
Locking down your API_KEY and why that is importantby@liliana
785 reads
785 reads

Locking down your API_KEY and why that is important

by LilianaAugust 26th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Using ES6, TypeScript, and webpack, you can create API_KEY as a global constant that can be configured at compile time. This solution would work in any other setting that uses webpack or ES6. The key won't be completely hidden when the app is running, but it can be used in production mode. The solution is simple to set the key for each deployment script to run the app in development mode and production mode, using webpack's HMR (Hot Mode Reload)
featured image - Locking down your API_KEY and why that is important
Liliana HackerNoon profile picture
Liliana

Liliana

@liliana

L O A D I N G
. . . comments & more!

About Author

Liliana HackerNoon profile picture
Liliana@liliana

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite