Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/7gowtham/nodejsfilesystem

API endpoint to create and list all files in a specified folder using Express
https://github.com/7gowtham/nodejsfilesystem

express nodejs readdirsync writefilesync

Last synced: 5 days ago
JSON representation

API endpoint to create and list all files in a specified folder using Express

Awesome Lists containing this project

README

        

# NodeJS File System

## Description
This exercise involves creating API endpoints to create a text file in a particular folder and to retrieve all the text files in that particular folder.

## Functionalities Used
1. Created an `Express` server
2. Created two API endpoints using `writeFileSync` and `readdirSync`.
3. `writeFileSync` to write data to a file.
4. `readdirSync` to read the contents of the directory and it returns an array of names of files and directories inside the particular folder.

## Deployed URL Endpoints
1. To write a file - https://nodejsfilesystem-jq09.onrender.com/write-file
2. To list the files in a directory - https://nodejsfilesystem-jq09.onrender.com/list-files