A Node.js website boilerplate that satisfies some common website requirements.
CSS JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3cf56de Jul 12, 2018
Failed to load latest commit information.
config read / write keys Dec 22, 2016
public read / write keys Dec 22, 2016
routes MailGun Mar 23, 2017
views added clearfix Mar 22, 2017
.babelrc πŸš€ Jul 24, 2016
.gitignore πŸš€ Jul 24, 2016
LICENSE.txt πŸš€ Jul 24, 2016
README.md Update README.md Jul 12, 2018
app-server.js πŸš€ Jul 24, 2016
app.js πŸš€ Jul 24, 2016
example-bucket.json πŸš€ Jul 26, 2016
package.json MailGun Mar 23, 2017


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. Content powered by Cosmic JS. 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.