https://github.com/dkzhen/cloudisk-service-node
A lightweight file management microservice with automatic image optimization built with Node.js and Express.
https://github.com/dkzhen/cloudisk-service-node
Last synced: 3 days ago
JSON representation
A lightweight file management microservice with automatic image optimization built with Node.js and Express.
- Host: GitHub
- URL: https://github.com/dkzhen/cloudisk-service-node
- Owner: dkzhen
- License: isc
- Created: 2026-04-19T07:27:53.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-19T07:38:38.000Z (about 2 months ago)
- Last Synced: 2026-04-19T09:29:33.176Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CloudDisk File Service
A lightweight file management microservice with automatic image optimization built with Node.js and Express.
## Features
- File upload with automatic image optimization (WebP conversion)
- Storage quota management (5GB default)
- Security: Helmet, CORS, Rate limiting, File type validation
- Path traversal protection
- Race condition prevention for concurrent uploads
## Tech Stack
- Node.js 18+ (ES Modules)
- Express 5
- Multer (file uploads)
- Sharp (image processing)
## Installation
```bash
npm install
```
## Configuration
Create `.env` file:
```env
PORT=3001
NODE_ENV=development
CORS_ORIGIN=*
```
## Usage
Development:
```bash
npm run dev
```
Production:
```bash
npm start
```
## API Endpoints
### Upload File
```bash
POST /api/files/upload
Content-Type: multipart/form-data
Field: file
```
### List Files
```bash
GET /api/files
```
### Delete File
```bash
DELETE /api/files/:filename
```
### Access File
```bash
GET /files/:filename
```
## Configuration
Edit `src/config/app.config.js` to customize:
- Storage limits
- Rate limiting
- Image optimization settings
- CORS settings
## Allowed File Types
Images, Documents (PDF, Word, Excel), Archives (ZIP, RAR), Text files, Videos, Audio
## Limits
- Max file size: 50MB
- Total storage: 5GB
- Rate limit: 100 requests per 15 minutes
## License
ISC