Giter Site home page Giter Site logo

jarielpa / parkandrideapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hsldevcom/parkandrideapi

0.0 2.0 0.0 5.79 MB

HSL project to collect and share parking capacity information

License: GNU Affero General Public License v3.0

Java 65.51% ANTLR 0.12% JavaScript 25.33% Smarty 0.06% HTML 6.76% CSS 1.24% SQLPL 0.21% Nginx 0.02% Shell 0.76%

parkandrideapi's Introduction

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.

parkandrideapi's People

Contributors

istonikula avatar ssaarela avatar luontola avatar koivisto avatar annamaritta avatar rjokelai avatar jarihonkonen avatar gmokki avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.