What is the purpose of Express?
Express is a framework for Node.js
Makes it easier to make RESTful APIs
Provides structure for server-side code to mirror structure in URL code we are serving
What are 3 benefits of using Express?
(also ability to mix static HTML with web pages
What is the purpose of Routes?
Allow you to tidy-up directory structure and scale up a web server to industrial-scale structure
What are templates?
What template engine does Express use by default?
Pug (formerly Jade)
Advantages and disadvantages of Pug
Advantages:
- templating allows boilerplate pages to be created that can be specialised
- Good readability - write paragraphs
- indentation (white space) instead of tags for structure
Disadvantages:
- white space indentation is error prone
- cannot use a mixture of template language and HTML, in Pug - only Pug!