This is a FastAPI-based public API that provides basic information in JSON format. It includes a registered email address, the current Nigeria datetime in ISO 8601 format, and a link to the GitHub repository.
- Returns a registered email address
- Provides the current Nigeria datetime dynamically in ISO 8601 format
- Includes a link to the GitHub repository
- Supports Cross-Origin Resource Sharing (CORS)
- Python 3.8+
- pip (Python package manager)
-
Clone this repository:
git clone https://github.com/EngrDhee/basic-info-api.git cd basic-info-api -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the API locally:
uvicorn info_api:app --reload
{
"registered_email": "talk2dayoabdul@yahoo.com",
"current_datetime": "2025-02-06T12:34:56.789+01:00",
"github_url": "https://github.com/EngrDhee/basic-info-api"
}-
Go to Railway.app and sign up using GitHub.
-
Click "New Project" → Select "Deploy from GitHub Repo".
-
Choose your repository and let Railway detect the environment.
-
Add a
Procfilewith the following content:web: uvicorn main:app --host 0.0.0.0 --port $PORT -
Click "Deploy" and wait for completion.
-
Once deployed, Railway will provide a public URL like:
https://engrdhee-infoapi.up.railway.app/
You can test the API using curl:
curl https://engrdhee-infoapi.up.railway.app/Or use a browser or tools like Postman to verify the response.
This project is licensed under the MIT License.