/timestamp-nodejs

A simple Node.js API that returns Unix timestamp and UTC time based on a given date.

Primary LanguageJavaScript

Timestamp API

This repository contains a simple Node.js application that provides an API endpoint to retrieve current Unix timestamp and UTC time. Additionally, it allows users to pass a date string as a parameter to get the corresponding Unix timestamp and UTC time. The endpoint returns the timestamp data in the following JSON format:

{
  "unix": 1707403038848,
  "utc": "Thu, 08 Feb 2024 14:37:18 GMT"
}

Setup

  1. Clone Repository:

    git clone <repository_url>
  2. Install Dependencies:

     npm install
  3. Run the Application:

     npm start
  4. Access the API:

Technologies Used

  • Node.js
  • Express.js