Skip to content

Instantly share code, notes, and snippets.

View ahuggins-nhs's full-sized avatar

Aaron Huggins ahuggins-nhs

View GitHub Profile
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({
@ahuggins-nhs
ahuggins-nhs / nodejs_worker_threads.d.ts
Created March 16, 2020 18:51 — forked from rsms/nodejs_worker_threads.d.ts
NodeJS worker_threads TypeScript typings
declare module "worker_threads" {
export var isMainThread: bool
export var parentPort: null | MessagePort
export var threadId: int
export var threadId: int
export var workerData: any
export interface Worker {
readonly threadId: int
readonly stdin: stream.Writable | null