Edit Page

views/layouts/layout.ejs

This Embedded JavaScript file acts as the default layout for all server side views rendered by your app.

Before one of your custom views is sent to the client, it is injected into this file. It is this file that is actually sent to the client.

Feel free to change this as you see fit. Its also a great place to include JavaScript and CSS that you plan on using in every view. This keeps you from having to include them in all your custom .ejs files.

Want to see for yourself?

An example of this file can be found in our sample app repo, here.

Anatomy of a Sails App