Skip to content

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

Notifications You must be signed in to change notification settings

7Gowtham/NodeJSFileSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published