2015-10-20 12:45:31 +02:00
|
|
|
# Librarix
|
|
|
|
|
2015-10-23 12:27:28 +02:00
|
|
|
Manage all your collections in your browser and automatically fetch infos from TheMovieDB
|
2015-10-20 12:45:31 +02:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2015-10-23 12:27:28 +02:00
|
|
|
Librarix is a simple Sinatra app that can be used as a standalone app or mounted in another app.
|
|
|
|
|
|
|
|
### Standalone
|
|
|
|
|
|
|
|
Create a Gemfile and add this line:
|
2015-10-20 12:45:31 +02:00
|
|
|
|
|
|
|
```ruby
|
|
|
|
gem 'librarix'
|
|
|
|
```
|
|
|
|
|
|
|
|
And then execute:
|
|
|
|
|
2015-10-23 12:27:28 +02:00
|
|
|
```sh
|
|
|
|
$ bundle
|
|
|
|
```
|
2015-10-20 12:45:31 +02:00
|
|
|
|
2015-10-23 12:27:28 +02:00
|
|
|
Finally, you need a `config.ru` file to launch the Rack application:
|
|
|
|
```ruby
|
|
|
|
require 'librarix'
|
2015-10-20 12:45:31 +02:00
|
|
|
|
2015-10-23 12:27:28 +02:00
|
|
|
Tmdb::Api.key('THE_MOVIE_DB_API_KEY')
|
|
|
|
Librarix.redis = Redis.new # use the correct host, port and db number for your redis database
|
2015-10-20 12:45:31 +02:00
|
|
|
|
2015-10-23 12:27:28 +02:00
|
|
|
run Librarix::Application
|
|
|
|
```
|