3.0 | 6 Votes
What is an EJS file?
An EJS template typically contains mostly static elements that make up the structure of the page along with one or more dynamic elements. The dynamic elements will be filled in with data from an external source, like a database, at a later time when the user requests the webpage.
For example, one EJS template could be used for multiple product webpages The template contains static elements for the page layout that make the appearance of the product pages similar. However, it also stores dynamic elements ("productname" and "productdescription" tags in this example) that will be filled in with the product name and description from a database when a user requests the page.
You can open EJS files with any text editor, since the files are saved in plain text format. However, you may want to use a source code editor that supports the language or allows you to install a plugin that supports the language to provide helpful coding features.