Skip to content

A cross-platform blog for iOS, Android and web. Content powered by Cosmic JS.

Notifications You must be signed in to change notification settings

mamadOuologuem/cross-platform-blog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-Platform Blog

alt tag This repo is an example of how to build cross-platform apps with content powered by Cosmic JS. The iOS and Android apps in this repo are built using React Native and the web app runs on a light Node.js web server, all with content served from the Cosmic JS CMS API. Create your content once, deliver everywhere. ###Features

  1. Native iOS and Android apps share the same React Native codebase. Learn once, write anywhereTM.
  2. Web is fully responsive down to mobile w/ Bootstrap frontend.
  3. Images are easily manipulated for different device / browser requirements via the Cosmic JS provided Imgix integration.

Sign up for Cosmic JS to install the app, add / edit content and deploy the web app.

** Before trying to run any of the examples, make sure you are connecting to the example bucket cross-platform-blog or have imported the bucket.json in the root of this repo to your own bucket in Cosmic JS.

Web

View the web demo here ###Get started with web

git clone https://github.com/cosmicjs/cross-platform-blog
cd cross-platform-blog/web
npm install

Run web in development

npm run development

Go to http://localhost:5000.

Run web in production

COSMIC_BUCKET=your-bucket-slug npm start

Go to http://localhost:3000.

Native

If you are new to React Native, make sure you check out the React Native docs to make sure you have everything set up properly.

Get started with native

cd cross-platform-blog/native
npm install

Config

Edit native/config.js to point to your bucket slug on Cosmic JS.

export default {
  COSMIC_BUCKET: 'your-bucket-slug'
}

Run iOS

Run the iOS command inside the native folder:

react-native run-ios

Run Android

Run the Android command inside the native folder:

react-native run-android

Questions

For any questions, feel free to reach out to us on the Cosmic JS website through the Intercom chat bubble on the bottom right side of the page. Or join the Cosmic JS Community on Slack.

About

A cross-platform blog for iOS, Android and web. Content powered by Cosmic JS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 76.2%
  • JavaScript 16.8%
  • HTML 3.1%
  • Objective-C 2.3%
  • Other 1.6%