In this blog I will show you how to pick up two existing codebase examples and curtail them into your own, beautiful cross-platform blog built using React Native and Node.js. This app is three apps in one: Web, iOS and Android app all with content powered by Cosmic JS. Go to the GitHub repo to see the iOS and Android app share the same React Native codebase which cuts dev time in half. The web version runs on a light Node.js server. When both codebases are leveraged for the cross-platform blog, developers and content editors can easily update content with one click to their web application, iOS application and Android application.
I’ll be using Cosmic JS (an API-first CMS that makes managing and building websites and applications faster and more intuitive) to install, edit content, deploy and make content updates moving forward from a web-based CMS.
1. Create a New Bucket
Your bucket’s name is the name of your website, project, client or web application that you are building. I named mine “Cross-Platform” to remain concise for our example blog.
2. Install the Cosmic JS Cross-Platform Blog
Once you’ve signed up and named your bucket, you’ll be prompted to start from scratch or “see some apps”. For this blog I simply clicked the right button to “see some apps” so that I could begin the installation process for the Cross-Platform Blog.
App Installation Options
Cosmic JS gives you the ability to filter between programming languages such as Node.js, PHP, React, AngularJS and more. Simply click “Install” underneath the Cross-Platform Blog icon to get started, or visit the Cosmic JS Apps Page.
3. Deploy to Web
I clicked “Deploy to Web”. I can then start editing my Objects while my web application is deploying. You will receive an email confirming the deployment of your web application. If you encounter any issues during deployment, you may be routed to the Cosmic JS Troubleshooting Page.
Confirm Deploy Location and Branch
Deploy Branch Confirmation Modal
I’m drawing from a repo, my branch is clarified and I have a deployed location that matches my slug / bucket name that I made in Step 1.
Deploy, Deploy Away
A little reassurance that you’ll soon be up, alive and well on the web. :)
4. Edit Global Objects, Object Types and Objects
Editing is a dream come true in the Cosmic JS Dashboard. To read more about how Cosmic JS was built with editing content in mind, read Building With the Content Editor in Mind.
App Deployment Confirmation
It’s as easy as signing up, creating a new bucket, installing the web application(s), edit content and deploy! I get my confirmation email to access my web application and also see my options for bucket upgrades like custom domains, one-click SSL, webhooks and localization.
Cosmic JS is an API-first cloud-based content management platform that makes it easy to manage applications and content. If you have questions about the Cosmic JS API, please reach out to the founders on Twitter or Slack.
Carson Gibbons is the Co-Founder & CMO of Cosmic JS, an API-first Cloud-based Content Management Platform that decouples content from code, allowing devs to build slick apps and websites in any programming language they want.
Hacker Noon is how hackers start their afternoons. We’re a part of the @AMI family. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!