Application for reading RSS feeds.
In order to run the application you will need PostgreSQL installed.
You must have the following tools installed
- `cd provisioning/chef'
librarian-chef install
cd ../..
vagrant up
There should now be a VM image containing the database at port 192.168.52.13
.
The application is designed to use PostgreSQL which is installed during provisioning.
-
In Terminal, navigate to the feedreader-db project and run the following
sh migrate.sh
The migrations use Flyway so it will download and install if it's not already installed. After the migrations run you should now have a database named "feedreader" installed in PostgreSQL.
The application uses Apache Qpid for processing asynchronous messages.
- Create a virtual host named
feedreader
- Create a queue named
feed.request
The application loads its configuration from properties files loaded at runtime. To override any properties, add a properties file at src/main/resources/feedreader/config-user.properties
. In the config-user.properties file you must specify at least the dataSource.user
, which is the user used to connect to the PostgreSQL instance. For other properties that can be overridden, see the config-default.properties
file.
Here are a few examples but see the tests within the feedreader-functional-test project for more.
To request the stream of feeds, run the following cURL command, where "<session_id>" is the ID of your session.
curl http://localhost:8080/services/v1/stream -H "Authorization:SID <session_id>"
To request a new feed be added to your reader, run the following cURL command, where "<session_id>" is the ID of your session.
curl http://localhost:8080/services/v1/feedSubscriptions -H "Authorization:SID <session_id>" -X POST -H "Content-Type: application/json" -d '{"url":"http://www.nasa.gov/rss/dyn/breaking_news.rss"}'