Ultimate Back-End Course
Introduction
- This is a back-end course that starts from scratch.
- The main objective of back-end development is to understand the interaction between the server and the database.
- Through this course, you will be able to write your own back-end applications.
Back-End Development
- The back-end is the part we cannot see on the website.
- It focuses on server-side programming.
- JavaScript is used for back-end through Node.js.
- MERN Stack: MongoDB, Express.js, React, and Node.js.
Server and Database
- A server is a computer system that provides data to clients.
- A database is used to store and manage the collection of data.
Introduction to Node.js
- A JavaScript runtime environment that allows JavaScript to be run on the server-side.
- A web server can be created with Node.js.
Express.js
- Express is a framework that simplifies working with Node.js.
- Provides shortcuts for server creation, routing, and middleware.
HTTP Methods
- GET: To retrieve data.
- POST: To create new data.
- PUT: To update existing data.
- DELETE: To remove data.
RESTful API
- Establishing communication between server and client through API.
- Data exchange in JSON format.
CORS Error and Solution
- CORS (CORS): Policy for Cross-Origin Resource Sharing.
- CORS errors are handled through third-party middleware.
Usage of MongoDB
- NoSQL database where data is stored in JSON format.
- Mongoose: ODM library for MongoDB and Node.js.
Data Operations
- Create: Creating new users.
- Read: Retrieving user data.
- Update: Updating data.
- Delete: Deleting data.
Middleware
- Code that runs between request and response.
- Custom, built-in, and third-party middleware.
Status Codes
- 200: OK
- 201: Created
- 400: Bad Request
- 404: Not Found
- 500: Server Error
Headers
- Additional information that goes along with requests/responses.
File Structure
- Organizing files professionally into separate folders for routes, models, configs, and controllers.
Authentication
- The next step for user verification.
Note: These notes are to understand the basics of back-end development. Each topic is covered in detail so that you can apply them in your projects.