First install an ejs template engine Then just write this in the configuration file, which is the same as the third floor, and finally change the suffix of jade to html
When you say html, do you mean html files, or do you use a template similar to html syntax first? If you want to use html directly, just put the html file in a static directory, access the html directly, and then get the data through ajax If I want to use the template function, but I don’t want to use jade’s syntax, so I can use ejs (ejs syntax is very close to html)
You can use
ejs
YeahAbsolutely. If you point directly to the html file, it is html. Of course, if you want to use the template function, it is best to use ejs.
You can write it this way and render points to the html file
Of course, you can just put the html file in the static folder (usually public)
This sentence is to set up the static folder. It is set to public here, which means that all static files are found in the public directory
See Hosting static files with Express for details
Yes, write your html directly in the template file, and then render the written template file
First install an ejs template engine
Then just write this in the configuration file, which is the same as the third floor, and finally change the suffix of jade to html
When you say html, do you mean html files, or do you use a template similar to html syntax first?
If you want to use html directly, just put the html file in a static directory, access the html directly, and then get the data through ajax
If I want to use the template function, but I don’t want to use jade’s syntax, so I can use ejs (ejs syntax is very close to html)