Skip to content

ogjaylowe/react-blog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmic JS Blog

React, Redux, Node, Cosmic JS

  1. React
  2. Node
  3. Config
  4. Development
  5. Demo

Node

Cosmic.getObjects(credentials, (err, response) => {})

React

  • src/app/*
  • Redux calls our Node API server, which in turn retrieves our Cosmic JS blog content.

Development

  • npm install
  • Terminal 1 - npm run start:server
  • Terminal 2 - npm run start:dev
  • localhost:3000

Config

  • Add the following code to your config/index.js file with your CosmicJS credentials.
const config = {
  app: {
    port: process.env.PORT || 5000
  },
  bucket : {
    slug: process.env.SLUG || 'YOUR COSMIC SLUG',
    write_key: process.env.WRITE_KEY ||'YOUR COSMIC WRITE KEY',
    read_key: process.env.READ_KEY ||' YOUR COSMIC READ KEY'
  }
}

module.exports = config;

About

Cosmic JS, React, Redux, Node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.0%
  • CSS 23.8%
  • HTML 1.2%