ejs Starter Kit

What is ejs?

ejs is a templating language that makes it easy to insert dynamic data into a page.

How to use this guide.

  1. Remix this app
  2. Open views/index.ejs to see the sample code and lots of comments, and learn how Mustache works.
  3. Click show in the top left header, and select "Next to code" to see the templates update as you make changes
  4. Open server.js to see the sample JSON data.


For example this is how you'd display an array of all the flavors of sparking water in the Glitch HQ fridge:

Creating Reusable Components

ejs also makes it easy to break your markup into smaller, reusable files called partials. This is useful for things like the footer and navigation which will be present across all of your pages.