Skip to content

RadhaPriyadarshan/Timestamp-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timestamp API Documentation

This project provides a simple API to create text files with the current timestamp and to retrieve a list of these files.

Features

  • Create Timestamp File: Creates a text file with the current timestamp.
  • List Timestamp Files: Retrieves a list of all the timestamp files in the files directory.

Prerequisites

  • Node.js (version 12 or higher)
  • npm (comes with Node.js)

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/RadhaPriyadarshan/Timestamp-API.git
    cd Timestamp-API
    
    

Links

Features

  • Create Timestamp File: Creates a text file with the current timestamp.
  • List Timestamp Files: Retrieves a list of all the timestamp files in the files directory.

API Endpoints

1. Create Timestamp File

  • Method: POST
  • URL: https://timestamp-api-yhz9.onrender.com/create
  • Description: Creates a text file with the current timestamp.

Example Request

POST /create

Example Response

{

  "message": "File created",

  "filename": "2024-05-31_15-30-00.txt"

}

2. List Timestamp Files

  • Method: GET
  • URL: https://timestamp-api-yhz9.onrender.com/
  • Description: Retrieves a list of all the timestamp files in the files directory.

Example Request

GET /

Example Response

{

  "files": [

	"2024-05-31_15-30-00.txt",

	"2024-05-31_15-35-00.txt"

  ]

}

Postman Documentation:

Published on Render.com:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published