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
- Native iOS and Android apps share the same React Native codebase. Learn once, write anywhereTM.
- Web is fully responsive down to mobile w/ Bootstrap frontend.
- 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.
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
npm run development
Go to http://localhost:5000.
COSMIC_BUCKET=your-bucket-slug npm start
Go to http://localhost:3000.
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.
cd cross-platform-blog/native
npm install
Edit native/config.js to point to your bucket slug on Cosmic JS.
export default {
COSMIC_BUCKET: 'your-bucket-slug'
}
Run the iOS command inside the native folder:
react-native run-ios
Run the Android command inside the native folder:
react-native run-android
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.