A read only file explorer with media capabilities.
To run the project you simply need to run:
make run
It should run using sqlite with a randon AES key. But if you don’t set a
AES_KEY
a new one will generated every time the project is realead and you
will be logged out.
You can also create a .env
file which will be read by make to populate the
environment variables, e.g.:
# .env
DB_TYPE=psql
DB_CON=host=localhost user=admin password=admin dbname=lens port=5432
LOG_LEVEL=error
SCHEDULER_COUNT=10
CACHE_PATH=/home/myhome/.thumb
AES_KEY=X4Eu3OT/WqUtUJhGLUtQ4xRahwhWYaSs+k2a03Kz1A8=
To generate a new AES_KEY
run:
openssl rand -rand /dev/urandom 32 | base64
Obs.: don’t quote the value, that will be done automatically.
Throughout the development you can also run make watch
for a hot reload
experience. It will feedback loop a bit faster.
To build you simply run:
make
And a ./bin/lens
will be created.
To install run:
make install
Or you can pass a custom target folder.
PREFIX=~/.local/ make install
It is used as template engine for html. To install it:
go install github.com/valyala/quicktemplate/qtc@latest
Libvips^1 is required by bimp ^2 used for image manipulation.
Used to generate video thumbnail.
Sassc^4 is used to generate the css file from sass.
Bulma is the css framework of choice for this project. It is added as sub-module, so don’t forget to pull it.