A simple Express.js server that creates and reads text files with timestamps. The server allows you to create new files with only timestamps and retrieve the contents of all files in a specific directory.
POST /new-file: Create a new file with content or a timestamp. GET /files: Retrieve all files and their contents from the directory.
Node.js (v12 or later) npm (Node package manager)
You can create a new file by making a POST request to /new-file
You can retrieve all files and their contents by making a GET request to /files.
Request Method: GET URL: http://localhost:5000/files
Response will be a Json. {[ {}, {}, {} ]}