# LifePex [![Build Status](https://drone.sceptique.eu/api/badges/Sceptique/LifePex/status.svg)](https://drone.sceptique.eu/Sceptique/LifePex) ## Dependencies * git * ruby 3 * sqlite or postgresql ## Setup ``` # Install dependencies bundle install # SQLITE ./init/database.rb sqlite://sqlite.db # POSTGRESQL psql -U postgres postgres -c "CREATE USER root WITH PASSWORD 'toor' SUPERUSER;" psql -U postgres postgres -c "CREATE DATABASE life_pex" ./init/database.rb postgres://root:toor@localhost/life_pex ``` ## Start ``` export LIFEPEX_SECRET="put something random here" # recommanded export LIFEPEX_BASE_URL="https://mydomain/base" # recommanded export LIFEPEX_DB="sqlite://sqlite.db" # REQUIRED # you may also want to use postgres or something # export LIFEPEX_DB="postgres://root:toor@localhost/life_pex" # export LIFEPEX_BIND="0.0.0.0" # you may want to bind against something else than 127.0.01 # export LIFEPEX_ENV="production" # why not hide stacktraces ? ./src/app.rb ``` ![recap image](https://git.sceptique.eu/attachments/ce7c2fab-bd1b-43fc-b10a-21b2c953e2c2) ![today image](https://git.sceptique.eu/attachments/ecd7a36d-eac7-40aa-b973-c6ddbac87f51) ## Generate documentation ``` ./init/doc.rb xdg-open ./public/doc/index.html ``` ## Testing If you want to run the test, simply type `rake test` (you will need the startup env variable to be set first).