This is a simple NestJS backend project that provides a GET /info endpoint to return a JSON response containing email, current_datetime, and link. The current_datetime is returned in ISO 8601 format.
This project is a basic NestJS application designed to demonstrate how to create a RESTful API endpoint. The GET /info endpoint returns a JSON object with the following fields:
email: A placeholder email address.current_datetime: The current date and time in ISO 8601 format.github_url: A Github URL.
This project is ideal for learning NestJS basics, testing API endpoints, and integrating with frontend applications.
- Node.js (v16 or higher)
- npm (Node Package Manager)
- NestJS CLI (optional but recommended)
-
Clone the Repository
git clone https://github.com/thamesblanq/zero-backend.git cd your-repo-name -
Install Dependencies
npm install
-
Start the Development Server
npm run start:dev
-
Access the Application
- The server will start on
http://localhost:3000. - You can test the
GET /infoendpoint using a browser, Postman, or ThunderClient.
- The server will start on
- URL:
GET /info - Description: Returns a JSON object with
email,current_datetime, andgithub_url.
- Method:
GET - URL:
http://localhost:3000/info - Headers: None required.
- Status Code:
200 OK - Body:
{ "email": "example@example.com", "current_datetime": "2025-01-31T12:34:56.789Z", "github_url": "https://github.com/thamesblanq/zero-backend" }
-
Using cURL:
curl -X GET http://localhost:3000/info
-
Using ThunderClient:
- Set the method to
GET. - Set the URL to
http://localhost:3000/info. - Send the request.
- Set the method to
-
Using a Browser:
- Open
http://localhost:3000/infoin your browser.
- Open
This project was created as part of the HNG Node.js Developers Program. Check out the program to learn more about building scalable backend systems with Node.js and NestJS.
This project is open-source and available under the MIT License.