bibliotek / bibliotek-api

API that serves Bibliotek data.
MIT License
0 stars 0 forks source link

Bibliotek API

Service designed to store PDF files and preferences for my personal library.

Build Status

Usage

The API has the following working methods:

Example request:

$ curl -X POST localhost:3000/ \
  -d 'owner=luis&name="My pdf paper"&path=./foo/bar.pdf'

Docker Setup

Review the Dockerfile and run it linking to a MongoDB instance. make setup will try to setup its own collection in the instance (called bibliotek). This image needs the upload volume mounted and also the following environment variables in order to work appropriately:

Those should be passed when running the image.

$ docker run -d --name bibliotek \
  --link mongo:mongo \
  -v ./uploads:./bibliotek-api/uploads \
  -e MONGODB_DATABASE=bibliotek \
  -e MONGODB_USER_NAME=bibliotek \
  -e MONGODB_USER_PASSWORD=bibliotek \
  bibliotek/bibliotek-api:latest