Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

RedHatInsights/sources-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sources API

DEPRECATED: this is the "original" Sources API, the rewrite is here: https://github.com/RedHatInsights/sources-api-go

this version is missing many of the newer features that the new version contains.

Build Status Maintainability Test Coverage Security

This project exposes an API for accessing objects living in the Sources Service database

Prerequisites

You need to install ruby >= 2.5 and run:

bundle install

Getting started

Setup your database configuration

config/database.dev.yml config/database.yml

Then edit the file to setup your postgres info

Next create the database

bin/rake db:create db:migrate
bin/rails s

To list all your routes, use:

bin/rake routes

Start your server:

bin/rails s

This will use kafka by default to send updates for created/updated/deleted actions. It uses localhost:9092 by default but this can be changed by passing QUEUE_HOST= and/or QUEUE_PORT=. To disable kafka updates pass NO_KAFKA=true.

License

This project is available as open source under the terms of the Apache License 2.0.