Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/7gowtham/nodejsfilesystem
- Owner: 7Gowtham
- Created: 2024-07-14T16:08:43.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T07:09:41.000Z (4 months ago)
- Last Synced: 2024-08-01T08:41:18.374Z (4 months ago)
- Topics: express, nodejs, readdirsync, writefilesync
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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