Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.43 KB

File metadata and controls

36 lines (23 loc) · 1.43 KB

CONNECTING A REACT FRONTEND WITH A NODE.JS BACKEND

Separation of Concerns

It follows the principle of separating the frontend and backend concerns. This separation makes your codebase more organized and maintainable. The frontend is responsible for the user interface and user experience, while the backend handles data processing, business logic, and interactions with databases and external services.

Scalability

Separating the frontend and backend allows you to scale each part independently. You can allocate more resources to the backend or frontend as needed to handle increased traffic or complexity.

Security

Keeping the backend separate from the frontend helps improve security. Sensitive operations and data should be handled on the server-side, reducing the risk of exposing critical information or logic to the client-side code.

Reusability

Backend logic can be reused across different frontend applications, such as mobile apps or other web applications.

STEP 1

Start React Server

npm start

Start Nodejs Server

node file_name.js

AXIOSS

Axios is a popular JavaScript library used for making HTTP requests from a web browser or Node.js.

It provides a simple and easy-to-use API for sending and receiving data from web services or APIs.

Axios is often used in frontend applications, including React, Vue.js, and Angular, as well as in backend Node.js applications.

PROCESS 2 WITHOUT PIC WITHOUT POST