Skip to content

Replace hardcoded localhost:8080 URLs with a centralised Axios instance #2

Description

@Thunder-Blaze

NotesPage.jsx and login.jsx both hardcode http://localhost:8080 in every Axios call. This makes it impossible to change the backend URL without editing multiple files.
Create a centralised frontend/src/api.js that exports a configured Axios instance using VITE_API_BASE_URL from .env.
Replace all raw axios.get/post/put/delete calls in NotesPage.jsx and login.jsx with the new instance.

  • Touches: frontend/src/NotesPage.jsx, frontend/src/login.jsx, new frontend/src/api.js, frontend/.env

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions