View on GitHub

reading-notes

Observations and questions from reading assignments.

EJS

Home

Using EJS to Template Node Applications

EJS allows for a fast and easy way to template applications. Easy to set up EJS has proven to be a good alternative as opposed to Jade, the default view engine for Express.

Setting up a node application is simple. Below is the typical file and folder structure.

File Structure

The only dependencies required are Express and EJS. After installing with npm install we need to set up and run our server.

Basic Server

To start up the server run node server.js.

Source:

Chris Sev