Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ajith-11399/nodejs-filesystem

Task 25 => This repository contains a NodeJs Task => Node Js File System
https://github.com/ajith-11399/nodejs-filesystem

date-fns expressjs filesystem javascript nodejs path-module

Last synced: 4 days ago
JSON representation

Task 25 => This repository contains a NodeJs Task => Node Js File System

Awesome Lists containing this project

README

        

# Node.js Filesystem - Current Timestamp Task

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.

## Project Description

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.

## Tools and Libraries Used

- **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.

## Operations

1. **Home**: Displays a welcome message.
2. **Create Timestamp File**: Creates a text file with the current timestamp.
3. **Retrieve Timestamp Files**: Lists all the timestamp text files in the directory.

## Routes

| **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 |

## License

> This repository is owned by
> AJ

## Backend Source Link

> Nodejs Filesystem - Current Timestamp TaskView Task

## API DOcumentation - POSTMAN API

> Here is the API documentation of Nodejs Filesystem - Current Timestamps Task
> View Documentation