At present, I use ejs to render the html templates at the back end.
However, does the front-end html return json through the interface to display the data, or does it also use ejs to display the data? Which approach is appropriate?
See if your front end uses frames or UI etc. ejs if not. In words, html