REST APIs
Resource-based APIs with predictable URLs, status codes, pagination and filtering, documented so clients don't guess.
Technology expertise / Ali Nawaz
Express is the Node.js framework I reach for most when a project needs a plain HTTP API. I like it because it's small enough to understand completely: a router, a middleware chain and a request and response object. Everything else is a choice, and I've learned which choices hold up over years of changes and which ones turn into debt.
Enlarge screenshot: SavyDive homepage hero

Recent project
SavyDive
SaaS product
Product research dashboard. A data-rich research dashboard that lets sellers search, filter and compare Walmart products in one table.
Read the case studyThe approach
In Express, the order of middleware is the architecture. Body parsing, CORS, authentication, validation, the route and the error handler run in the sequence you register them, and a mistake there can expose a route or swallow an error. I keep that chain short and written in one place, and I test it as deliberately as the routes themselves.
You work directly with me from requirements through launch. That keeps product context close to technical decisions and avoids the gaps that appear when strategy, interface, backend, and deployment are treated as separate problems.
What I can build
The scope is shaped around your users, operating reality, and the smallest responsible path to value.
Resource-based APIs with predictable URLs, status codes, pagination and filtering, documented so clients don't guess.
Small Express apps whose only job is to receive events from other platforms, verify them and queue the work.
Role checks expressed as middleware attached to routes, so it's visible at a glance who can call what.
Clients for outside APIs wrapped in their own modules, with timeouts and retries, so a slow partner doesn't hang requests.
Express 5
These are the changes from the official Express 5 migration guide that most often break an Express 4 app, and how I deal with each.
| Change in Express 5 | What I do about it |
|---|---|
| Wildcard routes must be named | Rewrite patterns such as /* to a named wildcard, and test that the root path still matches where it should |
| Optional ? and regex characters in paths removed | Replace them with brace syntax or arrays of paths |
| req.body is undefined until parsed | Check that a parser runs for every route that reads a body, instead of relying on an empty object |
| Old methods removed, such as req.param() and res.sendfile() | Replace each call with its supported version, found by searching the codebase |
| Rejected promises reach the error handler | Remove async wrapper packages and confirm every failure ends in the central error handler |
| Static files ignore dotfiles by default | Allow /.well-known/ explicitly if the app serves verification or security files |
Middleware order
A typical chain I write runs in this order: request ID and logging, security headers, CORS, body parsing with size limits, authentication, the router with per-route validation and role checks, a not-found handler, and the error handler last. Putting authentication after the router, or CORS after a route that already responded, are mistakes I've had to fix in inherited apps.
Keeping the chain in one file also makes reviews easier. Anyone can read it top to bottom and know exactly what runs before a handler.
Pitfalls
Error handlers registered with three arguments instead of four, so Express never treats them as error handlers. Routes that call res.json() and then keep running, causing headers-already-sent errors. CORS set to allow any origin with credentials. Body parsers with no size limit. Validation done by hand in some routes and skipped in others. And database queries built by joining strings, which invites SQL injection.
These are easy to miss in code review and easy to fix once you know to look for them.
Related work
My WordPress plugins follow the same rules on a different stack. SubmitDock exposes a REST endpoint that accepts form posts from any front end, validates them and stores them, and AJAX Search for Elementor serves search results through its own REST route. Designing those public endpoints, with input checks and predictable responses, is the same discipline I apply in Express.
What the work should create
Pricing
How pricing works
Client feedback
Reviews from clients I have worked with remotely, quoted as they wrote them.
The process
You get a senior engineering partner—not a black box. The process stays direct, collaborative, and focused on outcomes.
Clarify the problem, users, constraints, and measure of success.
Shape the right product, technical plan, and delivery path.
Create in focused iterations with quality visible at every step.
Test, deploy, measure, and improve with confidence.
Common questions
Express 5 for new projects. It forwards rejected promises to the error handler automatically, so async routes no longer need wrapper functions, and it requires Node.js 18 or later. I still maintain Express 4 apps and upgrade them when the project allows.
If the backend is a few endpoints next to a Next.js front end, route handlers in Next.js avoid running a second service. For a large team that wants strict conventions out of the box, a more opinionated framework can help. For a typical product API, Express is a good fit.
By feature. Each area, such as orders or users, has its routes, validation schemas, service functions and tests together. Routes only translate HTTP into function calls, so the business logic can be tested without a server.
A single error-handling middleware at the end of the chain, typed error classes for expected failures like not found or forbidden, and logging of unexpected errors with a request ID. Clients get a consistent response, never a stack trace.
Express itself is a thin layer, so security comes from setup: security headers, strict CORS, body size limits, input validation, rate limits on sign-in and parameterized database queries. I add all of those by default.
With automated tests that send real HTTP requests to the app and check status codes, response shapes and error cases, plus tests for the service functions on their own. Endpoints that handle money, sign-in or permissions get tests for the failures as well as the happy path.
My Express.js development service page covers what's included, pricing and the project process.
Start a conversation
Tell me what you’re building, where you are in the process, and what success looks like. I’ll get back to you with a clear next step within 24 hours.
ali@bealinawaz.com