Skip to content

Instantly share code, notes, and snippets.

@mtermoul
Created April 3, 2019 15:05
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 mtermoul/f62c54b2921ccc84a46ab545cdf4208d to your computer and use it in GitHub Desktop.
Save mtermoul/f62c54b2921ccc84a46ab545cdf4208d to your computer and use it in GitHub Desktop.
col-admin/src/api/cosmic.js
const Cosmic = require('cosmicjs')
const config = {
bucket: {
slug: process.env.COSMIC_BUCKET || 'col-admin',
read_key: process.env.COSMIC_READ_KEY,
write_key: process.env.COSMIC_WRITE_KEY
}
}
module.exports = Cosmic().bucket(config.bucket)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment