Skip to content

Update NEMAD API base URL #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yibo-Zhang
Copy link
Contributor

@Yibo-Zhang Yibo-Zhang commented Jul 18, 2025

User description

The backend API URL has changed. Updated the hardcoded URL from
https://nemad.org/api to
https://api.nemad.org/api.

Also made the URL configurable via NEMAD_BASE_URL environment variable for better flexibility.


PR Type

Bug fix, Enhancement


Description

  • Updated NEMAD API base URL from https://nemad.org/api to https://api.nemad.org/api

  • Made base URL configurable via NEMAD_BASE_URL environment variable


Diagram Walkthrough

flowchart LR
  A["Hardcoded URL"] --> B["Environment Variable"]
  B --> C["Default: api.nemad.org/api"]
  B --> D["Configurable via NEMAD_BASE_URL"]
Loading

File Walkthrough

Relevant files
Configuration changes
server.py
Make NEMAD base URL configurable                                                 

servers/nemad/src/nemad/server.py

  • Replaced hardcoded NEMAD_BASE_URL with environment variable lookup
  • Set new default URL to https://api.nemad.org/api
  • Added fallback mechanism using os.getenv() with default value
+1/-2     

Changed hardcoded URL from https://nemad.org/api to configurable
environment variable with https://api.nemad.org/api as default.
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Configuration Change

The hardcoded URL change from nemad.org to api.nemad.org should be validated to ensure the new endpoint is correct and accessible. The environment variable fallback mechanism should also be tested.

NEMAD_BASE_URL = os.getenv("NEMAD_BASE_URL", "https://api.nemad.org/api")

Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant