SShortSingh.
Back to feed

Node.js Feature Flag Check: 5 Express Middleware Route Gating Lessons

0
·1 views

A scheduled game-catalog import has two separate states: permission to run and evidence that it produced a result. Treating one as the other creates a quiet failure mode. Short answer: use an Express middleware boolean check to gate the import route, keep a safe local default, and monitor completed imports with an independent heartbeat. Server-side evaluation is the better fit when rollout timing must be predictable; polling clients cannot provide that guarantee. This distinction also makes cost attribution less slippery.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Jev 1.14 Released With Features Aimed at Builders and Dreamers

Jev version 1.14 has been announced on the typesafe.ai blog, according to a Hacker News post. The source material provided is limited to the headline, the link to the release post, and basic Hacker News metadata showing 7 points and no comments. The announcement is framed as being for builders and dreamers, but the specific features and changes in this release are not described in the available text. Further details would need to be confirmed by reading the original blog post directly.

0
ProgrammingDEV Community ·

Resume Tip: Use Problem-Action-Result Bullets with Numbers to Stand Out to Recruiters

A software engineer describes months of unanswered job applications and concluded that resumes were not conveying their impact clearly enough. Analyzing successful engineering resumes, the author found a recurring pattern: bullet points structured as Problem, Action, and Result, with a quantifiable outcome. The article contrasts vague task-list bullets with rewritten examples that cite specific latency reductions, recovered revenue, and test coverage gains. It also lists common pitfalls such as weak verbs, missing metrics, omitted tech stacks, and overly long bullets. The author recommends keeping each bullet to two lines and naming the tools used so both recruiters and applicant tracking systems can parse it easily.

0
ProgrammingDEV Community ·

New l10n_health tool audits Flutter translation files for unused and missing keys

A developer built l10n_health, a tool that checks Flutter translation files alongside Dart code for problems the analyzer misses. It reports unused keys, missing or untranslated entries across languages, mismatched placeholders, hardcoded text that bypasses localization, and hidden invisible Unicode characters. The tool works with gen_l10n and flutter_intl and can be installed globally or as a dev dependency. It also includes a careful prune command that removes unused keys as a text edit after validating the JSON, and can produce HTML, GitLab, and GitHub reports for CI.

0
ProgrammingDEV Community ·

Retry With Backoff and Jitter: A Reusable Pattern for Failed API Calls

A developer shares a retry function they reuse across projects, built to keep a single failed API call from overwhelming a backend. The article argues that naive retry loops, especially those with fixed delays, cause synchronized retry storms that prolong outages. The approach combines exponential backoff with full jitter so clients spread their retries out instead of firing together. It retries only on specific statuses like 429 and 503, respects Retry-After headers, and warns against retrying non-idempotent writes without idempotency keys. The author suggests starting with a 200ms base delay, a 30-second cap, and five attempts, then tuning based on observed failures.