This project serves as a simple node server that serves all the js files in a given folder
NodeJs and npm must be installed
npm install -g simple-js-server
sjss <path_to_js_dir> [port]
when no port is specified it will use 3000
- Create a new proxy host and link it to the sjss-server
- add the sjss-server with some url (js.example.com)
- edit the proxy host for your PhotoPrism instance
- in the advanced tab add (replace with your url):
sub_filter '</head>' '<script src="https://js.example.com/"></script></head>'; sub_filter_once on;
- in the advanced tab add (replace with your url):
now on every PhotoPrism instance loaded you get the js injected, this allows for the use of "extensions" even in the mobile application
This project was made for injecting js via a nginx reverse proxy, specifically for injecting into the PhotoPrism frontend, as a way to allow easy customisation and addon creation
See my PhotoPrism Projects for more details