A web application used for building and assigning truth trees.
You may use Willow at the following URL: https://willow.bramhub.com
Completely rewritten and revitalized by Connor Roizman, Eli Schiff, and Jeff Putlock.
See our User's Manual.
-
Clone the repository via
git clone https://github.com/Bram-Hub/Willow.git
. -
Install
nodejs
version 14+ and install project dependencies vianpm ci
from the project root directory. -
Install
postgresql
and start the service. Set up the Willow database via the following steps:-
Open a Postgres interactive shell as the
postgres
user:sudo -iu postgres; psql -U postgres
-
Set up the Postgres user
willow_user
and thewillow
database:CREATE ROLE willow_user WITH LOGIN PASSWORD 'your_password_here'; CREATE DATABASE willow WITH OWNER willow_user; \connect willow; CREATE EXTENSION pgcrypto;
-
(OPTIONAL) Edit
/etc/postgresql/VERSION_NUMBER/main/pg_hba.conf
to allow users other thanpostgres
to log in to thewillow_user
role in postgres. -
Exit the
postgres
shell and navigate to the root directory of the Willow repository. Set up the new database aswillow_user
usingpsql -U willow_user -W willow < setup.sql
-
-
Create an env file
cp .env.template .env
and configure the following optionsVariable Description NODE_ENV The environment in which this application is being run. The possible values are development
andproduction
HTTPS If the program is being run on an https server PORT The port to launch the program on BASE_URL The base url for example "http://localhost:8080" PGHOST The PostgreSQL host to connect to PGUSER The PostgreSQL user to log in as PGDATABASE The PostgreSQL database to use PGPASSWORD The password for the account specified by PGUSER PGPORT The port that the database is hosted on -
Create a config file
cp config.yml.template config.yml
to configure your list of system administrators. -
(OPTIONAL) Set up the unit testing framework with
npx ts-jest config:init
-
Launch the application using
npm run <command>
with one of the commands in the table below.Command Use debug
Recommended for development. Uses nodemon to recompile the code when changes are made. test
Runs the unit test suite (requires setup in step 6) dev
Runs the program once. Must be restarted when changes are made build
Builds the website in production mode start
Runs the built program