Web Development

Backend

Step-by-step articles on Backend, part of our Web Development collection.

  • 30 articles
  • 32 min of reading
  • 3 sub-topics
  • 05 Oct, 2026 last updated

Showing 30 articles

FastAPINew 1 min read

FastAPI Tutorial: Build a REST API in Python

FastAPI is a Python web framework built on type hints. You describe your inputs and outputs with types, and FastAPI validates requests, serialises responses and generates interactive API docs for you. Install and run pip install "fastapi[standard]" fastapi dev...

04 Oct, 2026 Author 1.17K 110
Read article
REST & GraphQL APIs 1 min read

API Pagination: Offset vs Cursor-Based

Any list endpoint needs pagination. The two main approaches behave very differently on large or fast-changing data. Offset pagination GET /articles?page=3&per_page=20 SELECT * FROM articles ORDER BY published_at DESC LIMIT 20 OFFSET 40; Pros: simple, lets user...

16 Sep, 2026 Author 1.16K 88
Read article
FastAPI 1 min read

JWT Authentication in FastAPI

This guide adds a /auth/token login endpoint that returns a JWT, and a dependency that protects routes. It follows the pattern FastAPI's own docs use. Install pip install pyjwt "pwdlib[argon2]" Hashing and tokens # security.py from datetime import datetime, ti...

24 Jul, 2026 Author 316 119
Read article
FastAPI 1 min read

Testing FastAPI Apps with pytest

FastAPI apps are easy to test because endpoints are plain functions behind an ASGI app, and dependencies can be swapped per test. A first test # test_books.py from fastapi.testclient import TestClient from main import app client = TestClient(app) def test_crea...

06 Jul, 2026 Author 139 124
Read article
REST & GraphQL APIs 1 min read

GraphQL vs REST: How to Choose

GraphQL and REST both work well. The right choice depends on your clients, your data and your team, not on which one is newer. The core difference With REST, the server decides the shape of each endpoint's response. With GraphQL, the client asks for exactly th...

05 Jul, 2026 Author 1.41K 39
Read article
Node.js 1 min read

Error Handling in Express 5

Express 5 finally handles async route handlers properly: if an async handler throws or returns a rejected promise, the error goes to your error middleware. No more express-async-errors or wrapping every route in try/catch. Async handlers just work app.get('/us...

19 Jun, 2026 Author 1.39K 82
Read article
Node.js 1 min read

Graceful Shutdown in Node.js

Containers and process managers stop your app by sending SIGTERM . If you exit immediately, requests in progress fail and database transactions are cut off. A graceful shutdown finishes the current work first. The steps Stop accepting new connections. Let in-f...

13 May, 2026 Author 423 114
Read article
FastAPI 1 min read

Deploying FastAPI with Docker

A production FastAPI deployment is usually a container running an ASGI server behind a reverse proxy or load balancer. Dockerfile FROM python:3.13-slim # uv for fast, reproducible installs COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv WORKDIR /...

13 May, 2026 Author 1.22K 53
Read article
REST & GraphQL APIs 1 min read

Documenting APIs with OpenAPI

OpenAPI (formerly Swagger) is a standard, machine-readable description of a REST API. One spec file can produce interactive docs, client SDKs, mock servers and request validation. A minimal spec openapi: 3.1.0 info: title: Orders API version: 1.0.0 servers: -...

12 May, 2026 Author 920 47
Read article
Node.js 1 min read

Finding Memory Leaks in Node.js

A memory leak shows up as memory that keeps climbing until the process is killed or restarts. The fix starts with proving where the memory goes. 1. Confirm the leak setInterval(() => { const { heapUsed, rss } = process.memoryUsage(); console.log(`heap ${(heapU...

25 Apr, 2026 Author 184 77
Read article
REST & GraphQL APIs 1 min read

Rate Limiting APIs: Algorithms and Headers

Rate limits protect your API from abuse, runaway scripts and accidental traffic spikes, and keep things fair between customers. Common algorithms Fixed window - count requests per calendar minute. Simple, but allows bursts at window edges (100 at 12:00:59 and...

24 Apr, 2026 Author 1.13K 32
Read article