Skip to content

Instantly share code, notes, and snippets.

@reaganmcf

reaganmcf/api.js Secret

Last active August 23, 2018 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reaganmcf/1e2e5f4ccb1a0bd237d21aeda96dd14a to your computer and use it in GitHub Desktop.
Save reaganmcf/1e2e5f4ccb1a0bd237d21aeda96dd14a to your computer and use it in GitHub Desktop.
Initial API Contents
//import Comsic JS Library
const Cosmic = require('cosmicjs');
//import our local Config
const config = require('./config');
//Fetch our Chore bucket
const choreBucket = Cosmic.bucket({
slug: config.BUCKET_SLUG,
read: config.API_READ_ACCESS_KEY,
write: config.API_WRITE_ACCESS_KEY
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment