1

I'm following a tutorial for google maps v3 where in the <head> they include:

<script type="text/javascript"
      src="https://maps.googleapis.com/maps/api/js?key=API_KEY&sensor=SET_TO_TRUE_OR_FALSE">
</script>

I want to share my code on github but I don't want my API_KEY to be public. Is there something I can do with .gitignore to reference the above script but not share my api key?

Connor Leech
  • 18,052
  • 30
  • 105
  • 150

1 Answers1

1

Maybe it's easier if you just don't use a key. It's an optional feature so Google can track your API usage for example if you need to purchase additional quota.

Th3Alchemist
  • 1,161
  • 2
  • 13
  • 25