/Amiami-kotlin-backend

Scrapper for pre-owned section of amiami.com

Primary LanguageKotlinApache License 2.0Apache-2.0

Scrapper for pre-owned section of amiami.com

Build Status

This application is a web-server and scrapper for pre-owned section of amiami.com

Spring Boot is used as main framework. Data is stored in MongoDB.

Routes

/v1/data

Returns unsorted list of scrapped items

/v1/currency

Returns currencies from fixer.io

Installation

You need the following to run server:

  1. Oracle JRE 8
  2. MongoDB on same host
  3. Systemd
  4. firebase.key from Firebase Cloud Messaging in secure.properties
  5. fixer.key from fixer.io in secure.properties
  6. Optionally you can setup port forwarding for default HTTP port
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080

The application is installed as systemd service, executable generated by spring boot gradle plugin. Start, stop and install can be done with gradle task: startService, stopService and installService are supported.

Repository version of firebase.key and fixer.key are encrypted in secure.properties.encrypted, you can't use it.