A versatile, high-performance web site stub with an infinite scrolling feed, designed for various testing, scraping, or placeholder purposes. Built with a simple Node.js backend, this project allows you to rapidly deploy entirely customized stubs by modifying a configuration file and a media folder.
- Lightweight Node.js backend for fast page loads and minimal resource usage.
- Infinite scroll functionality supporting the progressive loading of media assets.
- Fully dynamic customization via a single configuration file.
- Support for custom media payloads (images, video, or animations).
You can change the entire identity of the stub in seconds using the configuration file and the media asset directory:
-
config.json: Use this file to define the site metadata, layout, and loading behavior.- Title and heading text
- Favicon path
- Background styling
- Initial media count (loaded on page load)
- Incremental media count (loaded on scroll)
-
Media Folder: Place any desired images, videos, or animations into this folder. The infinite scroll engine dynamically pulls from this directory during loading.
Follow these steps to update your environment, install Node.js, manage the application process, and expose it via a reverse proxy.
Ensure your system packages are up to date before installing dependencies:
sudo apt update && sudo apt upgrade -ysudo apt-get install nodejs -y
node -v
npm -vInstall PM2 globally to handle the execution lifecycle of your server process:
sudo npm install -g pm2Launch the Node.js server using PM2 and assign it a reference name:
sudo pm2 start /var/www/stub/server.js --name "stub"To ensure the site stub restarts automatically after a system reboot, execute the following commands in sequence:
sudo pm2 startup systemd
sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u $USER --hp /home/$USER
sudo pm2 saveCheck the status of the process or monitor live runtime output using these utility commands:
sudo pm2 status
sudo pm2 logs stub