A simple REST API that returns basic information including email, current datetime, and GitHub repository URL.
This API is built using Node.js and TypeScript, providing a single endpoint that returns specific information in JSON format. The API handles CORS and returns the response with appropriate HTTP status codes.
When running locally: http://localhost:3000
Returns basic information including email, current datetime, and GitHub repository URL.
Response Format:
{
"email": "[email protected]",
"current_datetime": "2023-09-08T12:34:56Z",
"github_url": "https://github.com/oyerohabib/hng-12-BE-stage-0"
}
Status Codes:
- 200: Successful response
- 500: Server error
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/oyerohabib/hng-12-BE-stage-0.git
cd hng-12-BE-stage-0
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Build for production:
npm run build
- Start production server:
npm start
The server will start on port 3000 by default. You can modify this by setting the PORT environment variable.
- Node.js
- TypeScript
- Express.js
- CORS
This project is licensed under the ISC License.