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
// Import required libraries | |
const hubspot = require('@hubspot/api-client'); | |
const request = require('request'); | |
exports.main = (event, callback) => { | |
// Create a new HubSpot API client | |
const hubspotClient = new hubspot.Client({ | |
apiKey: process.env.HAPIKEY | |
}); |
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
//Import required libraries | |
const hubspot = require('@hubspot/api-client'); | |
const request = require('request'); | |
exports.main = (event, callback) => { | |
//Create a new HubSpot Client | |
const hubspotClient = new hubspot.Client({ | |
apiKey: process.env.HAPIKEY | |
}); | |
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
const express = require('express') | |
const app = express() | |
const crypto = require('crypto') | |
const secretKey = '<your secret key>' | |
const bodyParser = require('body-parser') | |
app.use('/webhooks', bodyParser.raw({ type: 'application/json' })) | |
app.use(bodyParser.json()) | |
app.post('/webhooks/orders/create', async (req, res) => { |
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
require('dotenv/config') | |
const express = require('express') | |
const app = express() | |
const port = 3000 | |
const client = require('twilio')(process.env.ACCOUNT_SID, process.env.AUTH_TOKEN) | |
// /login | |
// - phone number |
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
// step 1 install java | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer | |
sudo npm install java --save | |
// step 2 using | |
var java = require("java"); | |
var jarfile = "jarfileName.jar"; | |
java.classpath.push(jarPath); |