Skip to content

Instantly share code, notes, and snippets.

@zezic

zezic/cosmic.js Secret

Created August 3, 2018 17:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Cosmic JS Bucket factory example
import Cosmic from 'cosmicjs'
const cosmic = Cosmic()
const config = {
slug: process.env.slug,
read_key: process.env.read_key,
write_key: process.env.write_key
}
export default function getBucket () {
return cosmic.bucket(config)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment