This is a tool for collecting github data to feed the Haskell Tools website backend. In the folder frontend there is also a Elm frontend to present the data.
First make sure you have the requirements to build:
- PostgreSQL (with libpq develeopment files)
- Stack - to build the data collector.
- PostgREST - to run the REST api server.
Then follow the steps:
-
First setup the database (the double and single-quotes sequence is not a typo)
psql -v password="'password_for_postgrest_user'" postgres < db/haskell-tools.sql
-
Compile the data collector
stack setup stack build
-
Now to collect some data from Github repos use the command
haskell-tools-load
replacing DBUSER, DBPASS and DBHOST for the approprite values for the target database:stack exec haskell-tools-load "postgres://DBUSER:DBPAS@DBHOST/haskell_tools"
-
Start the API server using the password from step 1:
postgrest postgres://postgrest:password_for_postgrest_user@localhost/haskell_tools -a anonymous
This will open the API server in the port 3000. Having done this the frontend is compiled to connect on localhost:3000 by default, so compiling the elm application and opening it in a browser should work.