Lob api demo
A demo application built on Node.js that prompts the user for input on stdin and creates a letter to a state representative using the Lob api. Given the address of the user, we get the corresponding state representative's details from the Google Civic Api
The project was built on the the latest stable version of node.js v8.9.1 Make sure to have switched to Node 8 before executing the program.
The link to the output file is printed on the stdout. Any errors are also printed to stdout.
cd
into the project locationnpm i
to install dependencies
- You need a Google API key that is enabled for the Google Civic Information API
- Add your Google API key as an environment variable with the name
GOOGLE_API_KEY
. Runexport GOOGLE_API_KEY=YOUR_API_KEY
- OR you can also pass the API key as a command line argument.
- Run
node index.js
to start the program. - Run
node index.js YOUR_API_KEY
to pass the API key via command line