Skip to content

sab1990/chpl-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

chpl-api

The CHPL api

Installation instructions

Clone the repository

$ git clone https://github.com/chpladmin/chpl-api.git

Load the data model

See the instructions in the Open Data CHPL data model README.

ETL

See the instructions in the Open Data CHPL ETL README.

Authentication token & testing databases

The JSON token definition needs to be set in a file named chpl/chpl-auth/src/main/resources/environment.auth.properties. There is a file named chpl/chpl-auth/src/main/resources/environment.auth.properties.template that has the format. Copy that file and change the keyLocation key to something local.

Two files are used for testing purposes. There are template files for each of them that will need to be copied and renamed, with valid local data inserted:

chpl/chpl-auth/src/test/resources/environment.auth.test.properties
chpl/chpl-service/src/test/resources/environment.test.properties

Tomcat server

Modifiy server.xml to add a Resource to the GlobalNamingResources

<Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="100" maxIdle="30" maxWait="10000" name="YOUR NAME HERE" password="PASSWORD HERE" type="javax.sql.DataSource" url="jdbc:postgresql://WHEREVER YOUR DATABASE IS" username="DATABASE PASSWORD"/>

And add a ResourceLink to the Context in context.xml:

<ResourceLink global="jdbc/DATABASE NAME" name="jdbc/DATABASE NAME" type="javax.sql.DataSource"/>

Package everything

$ cd chpl
$ mvn package

Deploy webapp

$ cp chpl-service/target/chpl-service.war TOMCAT-INSTALLATION/webapps

About

The CHPL api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.7%
  • Shell 0.3%