Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sixtusagbo/alx-files_manager
A file manager API built with Express
https://github.com/sixtusagbo/alx-files_manager
back-end es6 expressjs javascript kue mongodb nodejs nosql redis
Last synced: 18 days ago
JSON representation
A file manager API built with Express
- Host: GitHub
- URL: https://github.com/sixtusagbo/alx-files_manager
- Owner: sixtusagbo
- Created: 2025-01-08T17:46:06.000Z (26 days ago)
- Default Branch: main
- Last Pushed: 2025-01-13T21:20:43.000Z (21 days ago)
- Last Synced: 2025-01-13T22:29:56.221Z (21 days ago)
- Language: JavaScript
- Size: 19.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# File Manager API
A robust file management API built with Express.js, MongoDB, and Redis. This application allows users to upload, manage and share files with authentication and caching capabilities.
## Technologies
- **Express.js**: Backend framework
- **MongoDB**: Main database for storing user and file information
- **Redis**: Caching and session management
- **Node.js**: Runtime environment## Key Features
- User authentication and session management
- File upload and storage management
- File access control (public/private)
- Folder structure support
- Image thumbnail generation
- Pagination for file listing## API Endpoints
### Authentication
- `GET /connect` - User login (Basic Auth)
- `GET /disconnect` - User logout
- `POST /users` - Create new user### Files
- `POST /files` - Upload a new file
- `GET /files/:id` - Get file by ID
- `GET /files` - List all files (with pagination)
- `PUT /files/:id/publish` - Make file public
- `PUT /files/:id/unpublish` - Make file private
- `GET /files/:id/data` - Get file content### System
- `GET /status` - Check API status
- `GET /stats` - Get stats about users and files## Installation
```bash
# Install dependencies
npm install# Configure environment variables
cp .env.example .env
# Edit .env with your MongoDB and Redis configurations# Start the server
npm start
```## Environment Variables
```
DB_HOST=localhost
DB_PORT=27017
DB_DATABASE=files_manager
FOLDER_PATH=/tmp/files_manager
```## Contributing
1. Fork the repository
2. Create a feature branch
3. Commit changes
4. Push to the branch
5. Open a Pull Request