This project provides a simple API to create text files with the current timestamp and to retrieve a list of these files.
- Create Timestamp File: Creates a text file with the current timestamp.
- List Timestamp Files: Retrieves a list of all the timestamp files in the
filesdirectory.
- Node.js (version 12 or higher)
- npm (comes with Node.js)
-
Clone the repository:
git clone https://github.com/RadhaPriyadarshan/Timestamp-API.git cd Timestamp-API
- GitHub Repository: Timestamp API GitHub
- Deployed API: Timestamp API on Render
- Postman Documentation: Timestamp API Postman Documentation
- Create Timestamp File: Creates a text file with the current timestamp.
- List Timestamp Files: Retrieves a list of all the timestamp files in the
filesdirectory.
- Method:
POST - URL:
https://timestamp-api-yhz9.onrender.com/create - Description: Creates a text file with the current timestamp.
POST /create
Example Response
{
"message": "File created",
"filename": "2024-05-31_15-30-00.txt"
}
- Method:
GET - URL:
https://timestamp-api-yhz9.onrender.com/ - Description: Retrieves a list of all the timestamp files in the
filesdirectory.
GET /
Example Response
{
"files": [
"2024-05-31_15-30-00.txt",
"2024-05-31_15-35-00.txt"
]
}