Serve images and videos directly from filesystem to a browser
Default Port: 9000
Environment Variables
LENSCAST_PORT
-- Overwrite port via environment
Configuration Files
lenscast uses the config package.
Add a file called local.EXT
, e.g. local.yml
like described here.
Quick
pnpm run bootstrap
pnpm run start -- port=9000
pm2
pnpm i -g pm2
pnpm run bootstrap
pm2 start bin/www
Setup
pnpm i -g apidoc
Generate docs
pnpm run docs:generate
The goal with this is to configure a Raspberry Pi with an external hard drive, optional Samba share and a Node.js installation with reverse proxy to serve images and videos in a simple way in a home network. I consider a home network relatively safe and photos and videos as non-sensitive data, thus there is no need for authentication, user-management or RBAC and whatnot. There is probably a considerable amount of data but still manageable via the good old filesystem and the help of modern hardware, i.e. SSDs. There is no need for fancy stuff like sorting photos by faces or locations. The main purpose is to sort images and videos into directories and present them as a slideshow. Thus no AI, databases or external APIs are necessary.
The code is certainly not optimal but it works. The project is practical and my approach to the code is the same. Still, contributions and improvements are very welcome.
- Setup
- git repo
- pnpm
- nodemon
- pm2
- express
- apidoc
- logging
- i18next
- Configuration
- Base directory
- Video autoplay
- Slideshow: Display photo for n seconds
- List files
- File names
- Differentiate between directories and files
- Preview (Thumbnails)
- Thumbnails
- Overlay (full-screen)
- Controls
- Close
- Forward
- Back
- Play / Pause
- Photos
- Videos
- Controls
- Detail page
- Photos
- Videos
- Controls
- Back
- Slideshow
- Photos
- Videos
- Controls
- Close
- Forward
- Back
- Play / Pause
- Calculate max display size of photos and videos
- Responsiveness (Mobile / TV friendliness)
- meta scale to device width
See CONTRIBUTING
See CREDITS
Unlicense (c) 2024 frncsdrk and contributors