Skip to content

Frontend still targets retired conduit.productionready.io API host #32

@jaycdave88

Description

@jaycdave88

Summary

The AngularJS frontend is still hard-coded to call https://conduit.productionready.io/api. That host now returns a 307 redirect to https://api.realworld.io/api, which then fails with Cloudflare DNS errors, so all API calls from the app end up blocked by CORS or return 5xx responses.

Steps to Reproduce

  1. Clone the repo and install dependencies (npm install).
  2. Run gulp (Node 10.24.1 via nvm).
  3. Open http://localhost:4000 and watch the network console.

Current Behavior

  • Requests for /articles and /tags redirect to the defunct api.realworld.io origin and fail with Access-Control-Allow-Origin missing, yielding status: -1 in Angular.
  • The home feed stays in the loading state and login/logout flows are unreliable because the API never returns data.
  • The failing responses bubble up as Possibly unhandled rejection errors in the console. When the redirect does succeed, the backend responds with offset=NaN, leading to a 500 "Internal Server Error".

Expected Behavior

The frontend should point to the active RealWorld demo API so data loads normally and authentication continues to work.

Proposed Fix

  • Update src/js/config/app.constants.js to use https://api.realworld.show/api, which is the backend referenced in the main RealWorld README.
  • Refresh the README section that mentions the live API host so new users start from the correct URL.
  • Guard the pagination component so it always computes a numeric limit/offset before issuing requests; this prevents offset=NaN queries that the new backend rejects with 500s.

With those changes applied locally, the home page loads articles and tags without CORS errors, and other core flows (login, favorites, editing) work again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions