Small Express server to browse remote filesystem via HTTP, designed to run in Docker.
Endpoints
- GET /health
- GET /fs/roots
- GET /fs/list?rootId=&path=&offset=0&limit=500
- GET /fs/stat?rootId=&path=
Env
- PORT (default 5055)
- AUTH_TOKEN (optional; if set, require Bearer token)
- CORS_ORIGIN (default *)
- FS_ROOTS: JSON array of allowed roots, e.g. [ {"id":"winshare","path":"/mnt/winshare","label":"Windows Share"} ]
Deploy on Ubuntu with Docker Compose
- Copy the 'server' folder to the Ubuntu host (where Docker runs):
- Files needed: Dockerfile, package.json, src/, docker-compose.yml, .env (create from .env.example)
- On the host, create .env from .env.example and set values:
- AUTH_TOKEN=changeme (optional)
- SMB_USER/SMB_PASS (use a valid Windows account or keep guest if enabled)
- FS_ROOTS to match mounted paths (default matches the compose volume at /mnt/win_f)
- Start the stack: docker compose up -d --build
- Verify: curl http://:5055/health
Notes
- The docker-compose.yml maps the Windows share //100.118.203.20/f into /mnt/win_f using CIFS volume options.
- Adjust SMB vers (3.1.1/3.0/2.1), domain, and credentials as needed.
- Ensure the Ubuntu host can reach 100.118.203.20 and that the share allows access.
Security
- Read-only endpoints in this POC. Add write ops cautiously.