diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-08-13 18:40:49 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-08-13 18:40:49 +0200 |
commit | 72ec551e6cb422531e543e3fb431324aed5ac025 (patch) | |
tree | 5919c6a20f64868ce7bad68c5094d4612accdb27 /README.md | |
parent | 5f660b309bc695277c67223520499fcc13f3c59f (diff) | |
download | lens-72ec551e6cb422531e543e3fb431324aed5ac025.tar.gz lens-72ec551e6cb422531e543e3fb431324aed5ac025.tar.bz2 lens-72ec551e6cb422531e543e3fb431324aed5ac025.zip |
feat: Add better tooling for running the project
* Add watch option for hot reload(ish).
* Read from `.env` file. This make local development a bit easier since
now can easily run the application with custom configuration.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 55 |
1 files changed, 53 insertions, 2 deletions
@@ -1,8 +1,59 @@ # Lens A read only file explorer with media capabilities. - -# Dev requirements + +# Dev + +To run the project you simply need to run: + +```bash +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.: + +```ini +# .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= +``` + +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. + +## Build and install + +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 +``` + +# Requirements ## qtc |