CEO & Co-Founder of Cosmic JS
Check out this website boilerplate built on Nuxt.js and Cosmic JS. It satisfies some common website requirements including dynamic pages, blog articles, author management, SEO ability, contact form and website search.
git clone https://github.com/cosmicjs/nuxtjs-website-boilerplate cd nuxtjs-website-boilerplate npm install
Import the bucket.json file into your Cosmic JS bucket. To do this go to Your Bucket > Settings > Import / Export Data.
COSMIC_BUCKET=your-bucket-slug npm start
Create a config/development.js file and match it to config/production.js with your values.
npm run development
As it states on the Nuxt.js website, you will need to set the environment variable HOST to 0.0.0.0. This is already done in the package.json script for you, but you could also set this on the “Set Environment Variables” section located in Your Bucket > Settings > Deploy Web App.
Because Node.js doesn’t have a mail server, the contact form uses mailgun to send the email. So add the following constants in the config file.