https://www.npmjs.com/package/google-distance
Using an API key is not required, but recommended since you can track your usage and make sure you don't exceed Google's quota. You can request a key by following these steps.
Specify an API key for use like this:
import distance from 'google-distance';
distance.apiKey = 'API_KEY';
Business users can omit the API key and instead specify their business client and signature keys:
import distance from 'google-distance';
distance.businessClientKey = 'CLIENT_KEY';
distance.businessSignatureKey = 'SIGNATURE_KEY';
-
Install the development dependencies:
npm install
-
Run the application:
npm start