Created
March 1, 2018 02:40
-
-
Save adamjstevenson/983689f508d5bd7bf5b2c80c7757e754 to your computer and use it in GitHub Desktop.
Setting up a function for Twilio and GDAX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use dotenv to load environment variables | |
require('dotenv').config(); | |
// Load Twilio and GDAX | |
const twilio = require('twilio'); | |
const gdax = require('gdax'); | |
// Set up GDAX for buying crypto | |
const gdaxClient = new gdax.AuthenticatedClient( | |
process.env.GDAX_API_KEY, | |
process.env.GDAX_SECRET, | |
process.env.GDAX_PASSPHRASE, | |
process.env.GDAX_API_ENDPOINT | |
); | |
// Set up Twilio client for sending SMS | |
const twilioClient = twilio( | |
process.env.TWILIO_ACCOUNT_SID, | |
process.env.TWILIO_AUTH_TOKEN | |
); | |
// Add a handler next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment