git clone https://github.com/cosmicjs/next.js-website cd next.js-website yarn
Run in development
yarn run development
Run in production
COSMIC_BUCKET=your-bucket-slug yarn start
Next.js + React + Cosmic JS
You can easily manage the content in your Next.js website on Cosmic JS. Follow these steps:
- Log in to Cosmic JS.
- Create a Bucket.
- Go to Your Bucket > Apps.
- Install the Next.js Website.
- Deploy your Next.js Website to the Cosmic App Server at Your Bucket > Web Hosting.
Next.js is a gift to the React community. Building React universal applications is not an easy task and the Next.js framework has greatly simplified the process. Some immediate benefits include:
- Less boilerplate for managing code reuse between server and client.
- Get up and going with your development environment instantly with hot-reloading.
- Simplified paging.
Cosmic JS is a perfect backend to manage your Next.js React Universal application.
- Query each page easily using the Cosmic JS NPM Module.
- No CMS boilerplate to configure, fast and easy setup.
- No updates or security updates required.