A Node.js website boilerplate that satisfies some common website requirements.
CSS JavaScript HTML
Failed to load latest commit information.
config read / write keys Dec 22, 2016
public read / write keys Dec 22, 2016
views clearfix after blurbs Oct 10, 2016
.babelrc 🚀 Jul 24, 2016
.gitignore 🚀 Jul 24, 2016
LICENSE.txt 🚀 Jul 24, 2016
README.md Update README.md Nov 25, 2016
app.js 🚀 Jul 24, 2016
example-bucket.json 🚀 Jul 26, 2016
package.json Update package.json Sep 23, 2016


Node.js Website Boilerplate

A website template that satisfies some common website requirements including dynamic pages, blog articles, author management, SEO ability, contact form and website search. Contributions welcome!


Click here to view a demo website (Medical Professional)


  1. Fully responsive down to mobile w/ Bootstrap frontend
  2. SEO ready
  3. A contact form that sends an email to your email(s) of choice and to Cosmic JS for easy reference
  4. Full-site search functionality
  5. All content is easily managed in Cosmic JS including pages, blog and contact info.

Sign up for Cosmic JS to install the demo content and deploy this website.

Get started

git clone https://github.com/cosmicjs/nodejs-website-boilerplate
cd nodejs-website-boilerplate
npm install

Import the example-bucket.json file into your Cosmic JS bucket. To do this go to Your Bucket > Settings > Import / Export Data.

Import Bucket

Run in production

COSMIC_BUCKET=your-bucket-slug npm start

Go to http://localhost:3000.

Run in development

Create a config/development.js file and match it to config/production.js with your values.

npm run development

Go to http://localhost:5000.


Contact email

Because Node.js doesn't have a mail server, the contact form uses an SMTPS string to connect to your mail server of choice. To do this, add an SMTPS_STRING to your ENV vars in your Cosmic JS bucket. This is located in Your Bucket > Settings > Deploy Website. An example string looks like: smtps://yourname%40gmail.com:yourpass@smtp.gmail.com.