View On GitHub
reading-notes
Reading Notes for Codefellows!
Project maintained by
AlanYHung
Hosted on GitHub Pages — Theme by
mattgraham
Code 301
Reading 11
(All My Notes are attributed/sourced from the Resources directly preceding them.)
Watch EJS tutorial from WalkThroughCode on YouTube, Videos 1-5
YouTube Channel: WalkThroughCode
Article Source
EJS is a way to create a view that a server can run.
The view is a file with an extension of
.ejs
and uses HTML
response.render can display create a frontend for a server to display
You pass to the render function the file without the
.ejs
extension
You can also pass an object into render as a 2nd parameter that can be used by the
.ejs
file
Within the
.ejs
use <% %> to use inject code functionality into the file.
You need an = sign for getting a variable value/evaluating a variable. i.e. <%= %>
You still need {} for code blocks such as For (loops) and If (conditional) blocks.
Additional SQL Resources
Google Books API Docs
EJS Docs
EJS Tutorial
Source Code for the EJS Tutorial
<– Back