https://github.com/likhithkp/express.js-file-management-system
This repository provides a simple file management system built using Express.js. Users can submit issues via a form, which are saved as text files on the server. The application also includes functionality to view the contents of these files and edit their names.
https://github.com/likhithkp/express.js-file-management-system
api backend ejs-templates express express-js filehandling formhandling fs get node post routes server
Last synced: about 2 months ago
JSON representation
This repository provides a simple file management system built using Express.js. Users can submit issues via a form, which are saved as text files on the server. The application also includes functionality to view the contents of these files and edit their names.
- Host: GitHub
- URL: https://github.com/likhithkp/express.js-file-management-system
- Owner: likhithkp
- Created: 2024-07-28T09:07:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-29T01:53:16.000Z (10 months ago)
- Last Synced: 2025-04-04T00:08:12.076Z (about 2 months ago)
- Topics: api, backend, ejs-templates, express, express-js, filehandling, formhandling, fs, get, node, post, routes, server
- Language: CSS
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express.js File Management App
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.
## Features
- **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.## Getting Started
### Prerequisites
- Node.js installed on your machine.
### Installation
1. Clone the repository:
```bash
git clone https://github.com/likhithkp/express.js-file-management-system.git```
2. Navigate to the project directory:
```bash
cd express.js-file-management-system
```
3. Install the dependencies:
```bash
yarn
```### Usage
1. Start the server:
```bash
yarn local
```
2. Open your browser or API client and navigate to `http://localhost:3001`.### Example Routes
- 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.## Contributing
Feel free to fork this repository, make improvements, and submit pull requests. Contributions are welcome!
## License
This project is licensed under the MIT License.