This project is a simple Node.js application that creates and retrieves text files with timestamps. The application uses Express for the server framework and the date-fns
library to format dates.
This Node.js application provides endpoints to create text files containing the current timestamp and to retrieve all text files from a specific directory. The main purpose is to demonstrate the use of the filesystem module in Node.js and to handle file operations.
- Node.js: JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express: Fast, unopinionated, minimalist web framework for Node.js.
- fs: File system module to interact with the file system.
- date-fns: Library for date formatting.
- path: Node.js module for handling and transforming file paths.
- Home: Displays a welcome message.
- Create Timestamp File: Creates a text file with the current timestamp.
- Retrieve Timestamp Files: Lists all the timestamp text files in the directory.
Routes | Method | Endpoint | Description |
---|---|---|---|
Home | GET |
/ |
Displays a welcome message |
Create | GET |
/create |
Creates a text file with the current timestamp |
Files | GET |
/files |
Retrieves all text files from the TimeStamps directory |
This repository is owned by AJ
Nodejs Filesystem - Current Timestamp TaskView Task
Here is the API documentation of Nodejs Filesystem - Current Timestamps Task View Documentation