Skip to content

Instantly share code, notes, and snippets.

View ahuggins-nhs's full-sized avatar

Aaron Huggins ahuggins-nhs

View GitHub Profile
@jeffdonthemic
jeffdonthemic / org_connection.js
Created March 25, 2019 21:15
jsforce with jwt
const jsforce = require('jsforce');
const jwt = require("salesforce-jwt-bearer-token-flow");
// create the connection to the org
let conn = new jsforce.Connection();
// load the private key for the token
let privateKey = require('fs').readFileSync('./server.key', 'utf8');
jwt.getToken({