Views and Templates
AdonisJS is an excellent fit for creating traditional server-rendered applications in Node.js. If you enjoy the simplicity of using a backend template engine that outputs HTML without any overhead of Virtual DOM and build tools, then this guide is for you.
The typical workflow of a server-rendered application in AdonisJS looks as follows.
- Choose a template engine to render HTML dynamically.
- Use Vite for bundling CSS and frontend JavaScript.
- Optionally, you can opt for libraries like HTMX or Unpoly to progressively enhance your application and navigate like an SPA.
The AdonisJS core team has created a framework-agnostic template engine called Edge.js but does not force you to use it. You can use any other template engine you would like inside an AdonisJS application.
Popular options
Following is the list of popular template engines you can use inside an AdonisJS application (just like any other Node.js application).