Free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.
Álvaro José Agámez Licha
Senior Software Engineer
The backend is the server-side part of a software application that handles data processing, business logic, and database interactions. It runs on remote servers, processes requests from the frontend (client side), and sends back appropriate responses.
Hypertext Transfer Protocol (HTTP) is the foundation of web communication, defining how clients (browsers) and servers exchange requests and responses.
Key HTTP Methods (Verbs):
To understand how HTTP messages work, we'll look at HTTP/1.1 messages:
The following table lists HTTP request methods and their categorization in terms of safety, cacheability, and idempotency.
Method | Safe | Idempotent | Cacheable |
---|---|---|---|
GET | Yes | Yes | Yes |
HEAD | Yes | Yes | Yes |
OPTIONS | Yes | Yes | No |
TRACE | Yes | Yes | No |
PUT | No | Yes | No |
DELETE | No | Yes | No |
POST | No | No | Conditional* |
PATCH | No | No | Conditional* |
CONNECT | No | No | No |
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
"Hold on, I’m thinking…" 🤔 (Server’s still loading, like your WiFi in a basement).
"Mission accomplished! 🎉 (rare like a perfect avocado in Europe 🥑)"
Oops, wrong address. Try this link. 🏃♂️💨" (The internet’s way of ghosting you to a new URL).
"You had ONE job…" 😤 (you messed up, I can't believe it).
"My bad, I’ll just… crash 💥" (server’s on strike. Blame the intern).
Code | Name | Meme Description |
---|---|---|
200 | OK | Everything worked!. (rare like a perfect avocado in Europe 🥑) |
201 | Created | New resource born! Name it wisely |
204 | No Content | Success! So clean and empty... like my desk on New Year's Day! 🧹💫 |
400 | Bad Request | You sent garbage. The server's judging you |
401 | Unauthorized | Oops! Did you forget your keys again? 🔑 Time for a coffee break while you reset your password! ☕😊 |
403 | Forbidden | You shall not pass! 🧙♂️ (Even if you brought coffee |
404 | Not Found | Whoops! This page went on vacation! 🏖️ Maybe try the homepage instead? 🏠💡 |
405 | Method Not Allowed | Nope. Try again, hacker boi |
500 | Internal Server Error | The server's on strike. (Blame the intern) |
502 | Bad Gateway | The backend is ghosting us |
503 | Service Unavailable | Server's taking a nap |
npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well.
npm consists of three distinct components:
# Create a Project Folder
mkdir my-node-project
cd my-node-project
# Initialize the Project
npm init -y
# Create an Entry File
touch index.js
# Write Basic Code in index.js
console.log('Hello from Node.js!');
# Run Your App
node index.js
{
"name": "your-project-name",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}