A simple web service for Astronomy Picture of the Day (APOD) written in Kotlin.
$ git clone https://github.com/amolkov/collapsar-server.git
$ cd collapsar-server
The app uses NASA Astronomy Picture of the Day (APOD) API to get pictures. You must provide your own API key in order to build the app.
Just put your API key into src/main/resources/application.properties (create the file if it doesn't exist already):
nasaApiKey=abc123
Put your database credentials into src/main/resources/persistence.properties (create the file if it doesn't exist already):
dataSource.url=jdbc:postgresql://localhost:5432/collapsardb
dataSource.username=postgres
dataSource.password=a
Put your database credentials into gradle.properties (create the file if it doesn't exist already):
flyway.url=jdbc:postgresql://localhost:5432/collapsardb
flyway.user=postgres
flyway.password=a
Before build you have to update your schema to the latest version with $ ./gradlew flywayMigrate -i
command.
You can build the app with $ ./gradlew build
command.
- Flyway: for database migrations.
- Hibernate: for orm mapping.
- OkHttp: as http client.
- Retrofit: for communicating with web services.
- Spring: as mvc framework
Copyright 2017 Alexander Molkov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.