Why is high code coverage not the same as good tests?
Simple meaning
Coverage only shows which lines ran, not whether assertions would catch a bug.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready MERN Full Stack questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
Coverage only shows which lines ran, not whether assertions would catch a bug.
Open the full page for Why, Steps, Example and Key takeaway.
Cross-site request forgery tricks the browser into sending a victim's cookies to your API from another site.
Open the full page for Why, Steps, Example and Key takeaway.
If you pass untrusted JSON into a query, an attacker can send operators such as $gt and change the filter.
Open the full page for Why, Steps, Example and Key takeaway.
Use HTTPS-only cookies, HSTS, a Content-Security-Policy for the React app, X-Content-Type-Options, and a tight Referrer-Policy.
Open the full page for Why, Steps, Example and Key takeaway.
Rate-limit by IP and account, add backoff, and consider CAPTCHA after failures.
Open the full page for Why, Steps, Example and Key takeaway.
Mass assignment happens when the API saves every field the client sent, including role or isAdmin.
Open the full page for Why, Steps, Example and Key takeaway.
Socket.IO adds rooms, automatic reconnection, and fallbacks such as long polling.
Open the full page for Why, Steps, Example and Key takeaway.
Namespaces split the socket server into logical apps, such as /chat versus /notifications.
Open the full page for Why, Steps, Example and Key takeaway.
Send the access token in the handshake auth payload or a cookie and verify it before joining rooms.
Open the full page for Why, Steps, Example and Key takeaway.
Some proxies, firewalls, or old browsers block the WebSocket upgrade.
Open the full page for Why, Steps, Example and Key takeaway.
The API checks Redis for a key, returns the value on a hit, and on a miss loads MongoDB then writes Redis with a TTL.
Open the full page for Why, Steps, Example and Key takeaway.
Cache-Control tells browsers and CDNs how long a response may be reused.
Open the full page for Why, Steps, Example and Key takeaway.
TTL is how long a cached entry lives before it expires.
Open the full page for Why, Steps, Example and Key takeaway.
A CDN caches JS, CSS, and images at the edge so users download them from a nearby location.
Open the full page for Why, Steps, Example and Key takeaway.
On pull request you install, lint, test, and sometimes build the React app.
Open the full page for Why, Steps, Example and Key takeaway.
An artifact is the compiled output you ship, such as a Docker image or a React dist folder.
Open the full page for Why, Steps, Example and Key takeaway.
Use separate pipelines or separate jobs with different env secret sets.
Open the full page for Why, Steps, Example and Key takeaway.
A location block matches /api and proxy_pass to the upstream Node port.
Open the full page for Why, Steps, Example and Key takeaway.
try_files looks for a real file and otherwise returns index.html.
Open the full page for Why, Steps, Example and Key takeaway.
Configuration belongs in the environment, not in committed files.
Open the full page for Why, Steps, Example and Key takeaway.