A Node.js-based web application for managing and serving static files across multiple categories (CSS, JS, images, videos, documents, fonts, etc.) with a modern UI powered by Semantic UI and DataTables.
├── app.js # Main Express app
├── src/
│ ├── routes/ # Express route handlers
│ ├── utils/ # Utility modules (logger, storage, auth)
│ ├── static/ # Frontend assets (Semantic UI, JS, CSS)
│ ├── views/ # EJS templates
│ └── ... # Other backend folders
├── data/ # Uploaded files (organized by category)
├── logs/ # Application logs
├── __tests__/ # Unit and integration tests
├── Dockerfile # Docker build instructions
├── docker-compose.yml # Docker Compose config
├── package.json # NPM dependencies and scripts
├── .env.example # Environment variable template
Clone the repository.
Copy .env.example to .env and configure environment variables.
Install dependencies:
npm install
Start MongoDB if not using Docker.
node app.js
Visit http://localhost:3000 in your browser.
Build and run with Docker:
docker build -t cdn .
docker run -p 3000:3000 -v $(pwd)/data:/usr/src/app/data -v $(pwd)/logs:/usr/src/app/logs cdn
Or use Docker Compose:
docker-compose up
GET /api/categories — List available categoriesGET /api/files?category=<name> — List files in a category (DataTables format)POST /upload — Upload filesPOST /login / POST /logout — AuthenticationRun unit tests:
npm test
This project is licensed under the Apache License 2.0. See LICENSE for details.
Semantic UI assets are licensed under the MIT License. See src/static/semantic-ui-css/LICENSE.
Content type
Image
Digest
sha256:68eadc6b3…
Size
78.8 MB
Last updated
2 months ago
docker pull sudohash/cdn