-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Susanna Nevalainen edited this page Dec 5, 2020
·
10 revisions
This repository includes notes I made while creating a full-stack online store template with node.js to understand better the history of web frontend and how to use node.js as a backend with local, SQL and NoSQL databases. For frontend, the project uses node.js with ejs templating engine. This approach was a common approach to build websites before REST APIs decoupled frontend and backend into separate independent entities and frontend frameworks like Vue/Angular/React took over.
The main idea is to use MVC approach:
- controllers represent the logic of node app in js; they connect views and models, include database actions, and render views
- views are what user sees, written in HTML and templating engine language (ejs, handlebars, pug etc)
- models data representation (classes/schemas)
- π Authentication
- β Add product to cart
- ποΈ Delete product from cart
- ποΈ View product details
- π View cart
- π³ Make order
- π§Ύ noteView orders
- βοΈ Receive welcome email after signup
- π Authentication
- β Add products
- βοΈ Edit products
- ποΈ Delete products
- Database option 1: Local JSON database
- Database option 2: MySQL (SQL)
- Database option 3: MongoDB (NoSQL)
- Cookies & Sessions
- Password encryption -
bcrypt
- Protecting from CSRF -
csurf