Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amsa2002/node-filesystem
Nodejs filesystem
https://github.com/amsa2002/node-filesystem
express-js filesystem nodejs render restful-api
Last synced: 6 days ago
JSON representation
Nodejs filesystem
- Host: GitHub
- URL: https://github.com/amsa2002/node-filesystem
- Owner: amsa2002
- Created: 2024-06-02T18:42:05.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-02T18:43:49.000Z (7 months ago)
- Last Synced: 2024-06-02T20:36:40.120Z (7 months ago)
- Topics: express-js, filesystem, nodejs, render, restful-api
- Language: JavaScript
- Homepage: https://node-filesystem-aum7.onrender.com
- Size: 3.87 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
1.Modules are imported to use their functionalities.
2.Express app is initialized and set to listen on port 7000.
3.A directory is created if it does not already exist.
3.Two endpoints are defined:
1. Root endpoint ('/'): Creates a text file with the current timestamp as its content and filename, and sends this content back in the response.
2. '/getTextFiles' endpoint: Lists all .txt files in the directory and sends the list back in the response as JSON.
4.The server is started and begins listening for requests on the specified port.
5.This code provides a simple RESTful API for creating timestamped text files and listing them.