Cosmic JS Blog Stay tuned for community news, company announcements and updates from the Cosmic JS team.

Starter Apps Now Available 🔥


We have new starter apps available to help you get started building Cosmic-powered apps faster and easier.  We currently have three starter apps available for Node.js, React and Vue.js which you can install right from the comfort of the Cosmic CLI.  

To install a starter app open your command-line tool and run the following commands:

Check out the codebase for each app:

Node.js Starter App
React Starter App
Vue.js Starter App


Enjoy these new starter apps to start your Cosmic-powered project faster and easier.  If you have any questions, reach out to us on Twitter and join the community on Slack.

You may also like


We are excited to introduce the all-new Cosmic JS content editor which is a huge improvement over our old editor.  We think you'll agree it makes adding API-powered content to your websites and apps easier and more enjoyable.  Here’s a list of some of the new functionality...

In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Brandon Reid, a JavaScript developer residing in Dallas, Texas who's currently Lead Developer at Simple Media. Brandon recently launched a new React / Node website on Cosmic for The Arnold Companies, an energy and aviation client. Follow Brandon on LinkedIn and GitHub, and enjoy the Q/A.

It's now even easier to add metafields to your objects.  Available metafields include: plain text, plain textarea, html textarea, select dropdown, object select (for object connections), image / file and date.

Sign in and check out the available metafield options that make it so easy to add dynamic content to your websites and apps.


In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Emma Wedekind, a developer and New York native now residing in Karlsruhe, Germany. Emma is a Software Engineer at LogMeIn and the Founder of CodingCoach.io. Follow Emma on Twitter, LinkedIn or Medium, and enjoy the Q/A.

Cosmic JS is a powerful CMS API that allows you to manage content for your websites and applications faster and easier.  But did you know that you can also use Cosmic JS to deploy code to your website (in any language) from any GitHub repository?  In addition to deploying content and code, starting today you can also add unlimited domains to your deployed application.  This is revolutionary because it means that moving forward all you need to launch your website is a git repository, a domain name provider and Cosmic JS!  No more hosting server necessary!  I’ve added a couple of screencasts for your viewing.  Let’s get started.

Create a Bucket

After logging in to your Cosmic JS account, create a new bucket.  After creating your new bucket, you will be prompted to install an app.

Install an App

Let's go ahead and install an app, but you could just as easily skip this step and deploy your own application pointed to your Cosmic JS bucket.  After installing your app, you will be prompted to deploy the application.

Deploy the App

Next click "Deploy Web App" to launch the web application to http://[your-bucket-slug].cosmicapp.co.  Once you do this it will take about a minute for the application to deploy on a custom instance of the Cosmic JS app server.  While this is working its magic, let's add our custom domains…

Add Custom Domains

The Cosmic app server subdomain is great for development and staging, but when you go live, you're going to want to add our own custom domains.  Cosmic JS makes this incredibly easy by providing the option to add custom domains to your deployed application.  Here are the 4 easy steps:

1. Go to Settings > Deploy Web App > Add Custom Domains (upgrade your account if needed)
2. Add your custom domains
3. Click "Set Domains"
4. Go to your domain name registrar's website and point your A Name Records to the Cosmic JS app server located at 162.243.13.186

Now navigate to your domain and notice that you now have your application hosted at your custom domain!  Add as many domains / subdomains as you need!  Whenever you need to deploy changes to the app, just push the changes up to your GitHub repository and click "Redeploy Web App".

Cosmic JS now gives you the power to deploy a website faster and more nimbly than any other system.  And all you need is a git repository, a domain name provider and Cosmic JS!

It's now faster and easier to make the content on your webpages dynamic.  The Official Cosmic JS JavaScript Client now comes with a minified browser version that allows you to add the power of Cosmic JS cloud-hosted content into your HTML page with a single file.  Download the Cosmic JS browser file then copy and paste this real-working browser example into an html file to check it out:

<!DOCTYPE html>
<html>
<head>
  <title>Cosmic JS Easy Browser Example</title>
</head>
<body>
<h1 id="title">If you see this, something isn't working...</h1>
<div id="content"></div>
<div id="metafields"></div>
<script src="cosmicjs.browser.min.js"></script>
<script>
var config = {
  bucket: {
    slug: 'easy-browser-example'
  },
  object: {
    slug: 'home'
  }
};
Cosmic.getObject(config, config.object, function(err, res) {
  var object = res.object;
  document.getElementById('title').innerHTML = object.title;
  document.getElementById('content').innerHTML = object.content;
  var metafields = object.metafields;
  var images = '';
  metafields.forEach(function(metafield){
    images += '<h2>' + metafield.title + '</h2>';
    images += '<img width="300" src="https://cosmicjs.com/uploads/' + metafield.value + '"/>';
    images += '<br><br>';
  })
  document.getElementById('metafields').innerHTML = images;
});
</script>
</body>
</html>

Sign in to your Cosmic JS account and connect this example to one of your buckets to see how easy it is to create powerful CMS-powered websites and app with Cosmic JS.