{"id":21169089,"url":"https://github.com/cosmicjs/react-blog","last_synced_at":"2025-07-09T18:31:47.013Z","repository":{"id":28135761,"uuid":"116417420","full_name":"cosmicjs/react-blog","owner":"cosmicjs","description":"Cosmic, React, Redux, Node","archived":false,"fork":false,"pushed_at":"2021-12-08T17:18:55.000Z","size":253,"stargazers_count":23,"open_issues_count":0,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T05:03:24.981Z","etag":null,"topics":["cosmicjs","nodejs","react","website"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"b-rays/cosmic-js-blog","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmicjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-05T19:01:45.000Z","updated_at":"2023-09-03T02:01:35.000Z","dependencies_parsed_at":"2022-08-30T06:01:03.905Z","dependency_job_id":null,"html_url":"https://github.com/cosmicjs/react-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cosmicjs/react-blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicjs%2Freact-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicjs%2Freact-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicjs%2Freact-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicjs%2Freact-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmicjs","download_url":"https://codeload.github.com/cosmicjs/react-blog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicjs%2Freact-blog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502387,"owners_count":23618587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cosmicjs","nodejs","react","website"],"created_at":"2024-11-20T15:22:55.201Z","updated_at":"2025-07-09T18:31:46.470Z","avatar_url":"https://github.com/cosmicjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cosmic JS Blog\n## React, Redux, Node, Cosmic JS\n\n\n1. [React](#react)\n1. [Node](#node)\n1. [Config](#config)\n1. [Development](#development)\n1. [Demo](#demo)\n\n\n\n## Node\n- ``` lib/app.js```\n- Node REST API to query Cosmic JS DB\n- [cosmicjs-node](https://github.com/cosmicjs/cosmicjs-node)\n``` javascript\nconst params = {\n  query: {\n    type: 'posts',\n    locale: 'en' // optional, if localization set on Objects\n  },\n  limit: 5,\n  props: 'id,slug,title,content', // get only what you need\n  sort: '-created_at' // optional, defaults to order in dashboard\n}\nbucket.getObjects(params).then(data =\u003e {\n  console.log(data)\n}).catch(err =\u003e {\n  console.log(err)\n})\n```\n\n## React\n- ```src/app/*```\n- Redux calls our Node API server, which in turn retrieves our Cosmic JS blog content.\n\n## Development\n- ```npm install```\n- Terminal 1 - ```npm run start:server```\n- Terminal 2 - ```npm run start:dev```\n- [localhost:3000]('http://localhost:3000')\n\n## Config\n-  Add the following code to your ```config/index.js``` file with your CosmicJS credentials.\n``` javascript\nconst config = {\n  app: {\n    port: process.env.PORT || 5000\n  },\n  bucket : {\n    slug: process.env.SLUG || 'YOUR COSMIC SLUG',\n    write_key: process.env.WRITE_KEY ||'YOUR COSMIC WRITE KEY',\n    read_key: process.env.READ_KEY ||' YOUR COSMIC READ KEY'\n  }\n}\n\nmodule.exports = config;\n```\n\n\n## [Demo](https://cosmicjs.com/apps/react-blog)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmicjs%2Freact-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmicjs%2Freact-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmicjs%2Freact-blog/lists"}