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.
In this blog I will show you how to pick up an existing website example and curtail it into your own, beautiful Next.js website for publishing content and easy updates. This React Universal Website is built using the Next.js framework. Code is shared between the client and server making development a breeze. Add Cosmic JS-powered content and you’re taking your website to the Next.js level.
Next.js is an amazing new addition to the React open-source ecosystem. It is “a minimalistic framework for universal server-rendered React applications” that makes the process of building these types of applications much faster and easier.
1. CREATE A NEW BUCKET
Your bucket’s name is the name of your website, project, client or web application that you are building.
2. INSTALL THE NEXT.JS APP
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 Next.js Website.
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 Next.js Website 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 Global Objects, Object Types and Pages 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
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 sign up, create new bucket, install web application, 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.