Skip to content
Go to file


Failed to load latest commit information.
Latest commit message
Commit time

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
cd nodejs-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.

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 form setup

Install and deploy the SendGrid Email Function.

The contact form on the contact page uses the SendGrid Email Function to send emails. To deploy your email function go to Your Bucket > Settings > Functions. Install and deploy the SendGrid Function. You will need an account with SendGrid to add your SendGrid API key.

Add the SendGrid Function Endpoint

in development

Go to config/development.js and edit SENDGRID_FUNCTION_ENDPOINT to manually add the URL for testing.

in production

If you are using the Web Hosting option that's included with every Bucket:

  1. Go to Your Bucket > Settings > Web Hosting
  2. Deploy your Website
  3. Click 'Set Environment Variables' tab and add the SendGrid Function endpoint:
Key Value


A Node.js website boilerplate that satisfies some common website requirements.





No releases published
You can’t perform that action at this time.