This repository provides a simple file management application built with Express.js. It demonstrates handling GET and POST requests, displaying and editing files, and implementing a basic form for submitting file data.
-
GET Routes:
/
- Displays a list of files with options to read or edit./file/:filename
- Shows the content of a specific file./edit/:filename
- Provides a form to rename a file.
-
POST Routes:
/submit
- Submits a new file with the provided name and content./edit/:filename
- Submits changes to rename an existing file.
- Node.js installed on your machine.
- Clone the repository:
git clone https://github.com/likhithkp/express.js-file-management-system.git
- Navigate to the project directory:
cd express.js-file-management-system
- Install the dependencies:
yarn
- Start the server:
yarn local
- Open your browser or API client and navigate to
http://localhost:3001
.
- GET / - Home route displaying a list of files.
- GET /file/:filename - View the content of a specific file.
- GET /edit/:filename - Edit the name of a file.
- POST /submit - Submit a new file.
- POST /edit/:filename - Update the file name.
Feel free to fork this repository, make improvements, and submit pull requests. Contributions are welcome!
This project is licensed under the MIT License.