-
Notifications
You must be signed in to change notification settings - Fork 729
Setting up your API key
Mike North edited this page Feb 7, 2018
·
1 revision
The final exercises in this workshop depend on the google places API, and you'll need to generate a free API key in order to use it. It'll take about one minute to set this up.
mv apikeys.js.default apikeys.js
Don't worry about putting private data here. It won't be committed to git
Go to the API key generation page and click the "Get a Key" button
module.exports = {
//google: `${'<PASTE YOUR API KEY HERE>' || process.env.GOOGLE_API_KEY}`
google: `${"you-can't-see-my-key-hahahaha" || process.env.GOOGLE_API_KEY}`
};
Start up the autocomplete-1 project
npm start autocomplete-1
And then then when visiting this url http://localhost:3000/maps/api/place/autocomplete/json?types=establishment&input=coffee
You should see a JSON response containing data about coffee shops