/zhinpile

NodeJS HTTP server for serving a pile/sh*tton/f*ckload of images

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

zhinpile

NodeJS HTTP server for serving a pile/sh*tton/f*ckload of images and videos.


Features

  • Supports both images and videos
  • Auto-plays videos
  • Simple and free (free as in freedom) (you can learn from this project or build on it!)
  • Dynamic loading of items (no need to restart after adding photos)
  • Lazy loading using Infinite scroll
  • Beautiful layout using Masonry
  • Lightbox built-in (Make images and videos fullscreen by clicking them!) (Also look at these cute animations)

Installation

Step 1

Download this repo as a zip and unzip it or clone it using

git clone git@github.com:Zhincore/zhinpile.git

Step 2

Install required libs using npm inside the directory

cd zhinpile
npm i

Done

You may also remove all example photos in frontend/data/ and replace it with yours.

Confguration

All options are on the top of the index.js file.

Sample configuration

/****************/
/**** CONFIG ****/
/****************/

const PAGE_SIZE = 16;     // How many photos per page?
const TITLE = "Foxes";    // A pile of what?
const PORT = 8131;  
const HOST = "127.0.0.1"; // Localhost
const DESC = "Cute foxes I have found on the internet!" // Description of the pile
const TAGS = [ // Tags to be cool at Google Search
  "fox", "foxes", "cute", "ginger", "white", "adorable", "nature"
]

Usage

Put all your photos and videos in the frontend/data/ directory and run node in the root folder (e.g. zhinpile) like this:

node .

You can now view the photos at http://localhost:8131/<anything>.
The <anything> is there because this repo is meant to be behind a proxy like Nginx.
E. g. my setup is https://personal.zhincore.eu/ari

Screenshot

Screenshot