Backend with next js to build an e-commerce website

30 Views Asked by At

Guys it's really bothering me that i want to know how do e-commerce websites know that the customer made an order!! I mean like how do u receive that as devolper, I'm learning front-end and I'm planing to be full stack so that's why I'm asking

Trying to understand

1

There are 1 best solutions below

0
Mıktad Tahir Durak On

I'll give you an example of using the MERN stack. You create a backend and create an order model, routes, and controller(where you make CRUD operations- check CRUD if you don't know yet).

Using Express.js, you create an API to talk between your frontend, admin panel, and backend. Creating an order is creating a request to the backend from API using the frontend. But, to better understand it, I suggest you try creating with tutorials and start with understanding CRUD.

Think about a restaurant. Frontend is where people eat, the backend is the kitchen, the database is the larder or the depot of it, and waiters that creates communication symbolize API, or HTTP requests.