Build a Simple Node.js Blog in 4 Steps by@carsoncgibbons

Build a Simple Node.js Blog in 4 Steps

Carson Gibbons HackerNoon profile picture

Carson Gibbons

Director of Sales @ Preciate Formerly Co-Founder @ Cosmic JS Y Combinator W19 Batch

We build a lot of example applications at Cosmic JS, and we do this to back up our mantra of showing and not just telling. Developers want to visualize use case scenarios and collaborate with other developers’ work, so we as co-founders are always dialed in to what types of websites and apps our Cosmic JS Community wants to see next — this week’s winner was a simple Node.js Blog App that can be installed and deployed in minutes, ready for content. In this tutorial I’m going to show you how to create a simple blog roll using Node.js and Cosmic JS. This is going to be the fastest and most light-weight blog you have ever created. Let’s get started.

We’ll be picking up an existing codebase to build your very own beautiful Node.js Blog Roll App. Cosmic JS has a simple blog roll for the traveler and story teller. Easily add and edit authors, create blog posts and assign categories. Deploy this app in minutes to begin documenting your journey.

I’ll be using Cosmic JS for this example blog. Cosmic JS is an API-first CMS that makes managing and building websites and applications faster and more intuitive. By decoupling content from code, Cosmic JS empowers developer flexibility while ensuring content editors can plan and deploy content as it best suits them. Cosmic JS lets developers use the tools they love, like Node.js, GitHub, Docker and more. We’ll be using Cosmic JS to install our example app, deploy and make content updates moving forward from the cloud-based Content Management Platform.

If you haven’t already, get started by Signing Up for Cosmic JS. Helpful resources are provided below to streamline your development operations.

How to Build a Simple Blog Using Node.js
Blog Roll App Page
Blog Roll App Demo
Blog Roll App Codebase on GitHub

1. Create a New Bucket

Your bucket’s name is the name of your website, project, client or web application that you are building. I named mine “Blog App” to remain concise for our example blog.

2. Install the Cosmic JS Blog Roll App

Once you’ve signed up and named your bucket, you’ll be prompted to start from scratch or “see some apps”. For this blog I simply clicked the right button to “see some apps” so that I could begin the installation process for the Blog Roll App.

App Installation Options

Cosmic JS gives you the ability to filter between programming languages and utilities such as Blog, Contact Form and more.

Simply click “Install” underneath the Blog Roll App icon to get started, or visit the Cosmic JS Apps Page.

3. Deploy to Web

I clicked “Deploy to Web”. I can then edit Objects while my web application is deploying. You will receive an email confirming the deployment of your web application. If you encounter any issues during deployment, you may be routed to the Cosmic JS Troubleshooting Page.

Confirm Deploy Location and Branch

Deploy Branch Confirmation Modal

I’m drawing from a repo, my branch is clarified and I have a deployed location that matches my slug / bucket name that I made in Step 1.

Deploy, Deploy Away

A little reassurance that you’ll soon be up, alive and well on the web. :)

4. Edit Global Objects

Editing is a dream come true in the Cosmic JS Dashboard. To read more about how Cosmic JS was built with editing content in mind, read Building With the Content Editor in Mind.

App Deployment Confirmation

It’s as easy as signing up, creating a new bucket, installing the web application(s), edit objects and deploy! I get my confirmation email to access my web application and also see my options for bucket upgrades like custom domains, one-click SSL, webhooks and localization.

Cosmic JS is an API-first cloud-based content management platform that makes it easy to manage applications and content. If you have questions about the Cosmic JS API, please reach out to the founders on Twitter or Slack.

Carson Gibbons is the Co-Founder & CMO of Cosmic JS, an API-first Cloud-based Content Management Platform that decouples content from code, allowing devs to build slick apps and websites in any programming language they want.


Signup or Login to Join the Discussion


Related Stories