Skip to content

jarielpa/parkandrideAPI

 
 

Repository files navigation

parkandrideAPI Build Status Coverage Status

HSL open source project to collect and share parking capacity information.

The service can be found at https://p.hsl.fi/

API documentation can be found at https://p.hsl.fi/docs/

Development

In both the approaches described below, the application runs in localhost:8080 after the steps are completed.

Without livereload

Browser refresh is required when frontend resources are updated.

  • run grunt watch in application/src/main/frontend
  • run application with env_local profile. Application can be run
    • from an IDE by running fi.hsl.parkandride.Application
    • from command line by running the packaged jar (non-frontend changes require restart)
      • java -jar application/target/parkandride-application-1-SNAPSHOT.jar --spring.profiles.active=env_local

With livereload

  • do the steps defined in 'Without livereload' with the distinction that application is started at port 9100, e.g.
  • java -jar application/target/parkandride-application-1-SNAPSHOT.jar --server.port=9100 --spring.profiles.active=env_local
  • install nginx and configure it as described in etc/nginx.conf. It routes
    • /api requests to localhost:9100
    • other requests to localhost:9000 (grunt-connect listens at this port)

Profiles

Environment profiles

Application is started with a single environment profile. Any features required by the environment, are triggered in the environment profile by adding feature profiles under property spring.profiles.include.

Profile Description
env_local development with H2
env_local_psql development with postgres
env_gocd e2e testing in gocd environment
env_travis e2e testing in travis environment
env_test test deployment in aws
env_demo demo deployment in aws

Feature profiles

Profile Description
dev adds application/src/main/frontend/build as webapp resource
dev_api brings up DevController
psql postgres is used instead of the default H2

Postgresql initialization

Schema and default test-user (liipi) can be installed on running Postgresql with etc/scripts/db/psql-init-db.sh. See the file for example usage.

License

Copyright © 2015 HSL

The source code of this program is dual-licensed under the EUPL v1.2 and AGPLv3 licenses.

The data hosted in this service is licensed under the CC BY 4.0 license.

About

HSL project to collect and share parking capacity information

Resources

License

AGPL-3.0, EUPL-1.2 licenses found

Licenses found

AGPL-3.0
LICENSE-AGPL.txt
EUPL-1.2
LICENSE-EUPL.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 65.5%
  • JavaScript 25.3%
  • HTML 6.8%
  • CSS 1.2%
  • Shell 0.8%
  • SQLPL 0.2%
  • Other 0.2%