-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes
21 lines (21 loc) · 853 Bytes
/
Notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package.json
- hold Node application info and the dependencies we need (express and EJS)
- dependencies - modules basically
server.js
- hold our Express server setup, configution
- define our routes to our pages here
EJS
- Node.js templating language
Express.js
- web application framework
- organize web application into MVC architecture on the server side
- Express.js is to Node.js as Ruby on Rails is to Ruby
What is view engine?
- responsible for creating HTML from your views
- views are some kind of mixup of HTML and a programming language
EJS Partials
- there will be a lot of code that is reused
- head, header, footer
1. set up project in package.json
2. run npm install to install the dependencies
3. in the server.js, configure app to use EJS and set up routes for index page and about page