I finally got CORS!
My frontend at localhost:3000 kept failing to fetch from localhost:4000 - turns out different ports = different origins!🧵
1
1
26
The fix is simple:
1️⃣ Backend needed: Access-Control-Allow-Origin: http://localhost:3000
2️⃣ My frontend fetch just needed: { mode: 'cors' }
That moment when you realize CORS isn't broken - it's working exactly as designed to keep us safe!
#WebDev #TheStruggleIsReal
2
32
Multer package in node is quite beneficial for parsing the form data in the backend.Was not able to parse the form data then got to know about this package.👨💻
#Node #Javascript #NPM
1
24
I used to feel like callback makes things difficult!But now I feel like without them asynchronous code would not have been possible in javascript and now i feel their importance🧵
#javascript #webapi
1
14
This is all that you need to know if you want to know about how does javascript run?
#javascript #eventloop
1
21
Server-side programs can "listen" for requests because they talk to the OS, and the OS knows how to handle TCP.
The OS listens on a port, and your code (like app.listen(3000)) just asks the OS to wake it up when someone connects.
It’s all built on layers! 🔥
#backenddev #Node
1
25
Scared of terms like TCP, HTTP, or UDP?
Don’t be.
They’re not dangerous — they’re just rules that define how two devices talk.
Let me break it down in plain English. 👇🧵
1
1
24
So every time you visit a website:
You (client) send a request
A server receives it
Both speak the same protocol (HTTP over TCP)
They understand each other — and a page appears.
1
1
22
Just clicked how computers store everything as 0s/1s! 🤯
🔷The SAME binary (like 01000001) can be:
The letter 'A' 📝
The number 65 🔢
A pixel color 🖼️
Sound 🔊
Context is EVERYTHING! How we read it changes its meaning.
Knowing this feels like a superpower!
#TechBasics #Binary
1
29
Today I published my own npm cli package so it is a basically a simple word-counter project. To use:
🔷npm i meword-counter-cli
To run:
🔶npx meword-counter-cli ./wordtest.txt
or
🔶In package.json
"scripts": {
"count": "word-counter"
} and then run npm run count wordtest.txt
1
28
Just learned about SSH servers and it’s wild!
I tried it with my friend’s laptop-opened her terminal from my computer like magic.
Turns out, real servers don’t even need passwords. Instead:
Server holds a public key (like a lock)
Client holds the private key (the actual key).
1
40
Tried something I thought was impossible!
A while back, I used to wonder—how do people turn their PCs into servers? It seemed like some next-level hacker stuff.
But guess what? I tried it! Here's the simple breakdown:🧵
1
1
30
1️⃣ Got a public IP for my router (just called my ISP)
2️⃣ Set up port forwarding (in the router's gateway)
3️⃣ Bought a domain (@GoDaddy) and linked it to my IP
And it freaking worked!
#NoobToServer #TechMag
27

