Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tmp
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

epub-press

Build

Backend server for EpubPress.

For clients, see epub-press-clients.

Setup

git clone https://github.com/haroldtreen/epub-press
cd epub-press
npm install

Usage

Docker Setup

  1. Install Docker
  2. docker-compose up

You'll also want to run database migrations if it's your first time running the service:

npx sequelize-cli db:migrate

EpubPress will be running at http://localhost:3000.

Development Setup

  1. Install Docker
  2. docker-compose up postgres
  3. npm start

You'll also want to run database migrations if it's your first time running the service:

npx sequelize-cli db:migrate

EpubPress will be running at http://localhost:3000 and reload upon file changes.

To build a version of EpubPress that talks to a local server, see epub-press-chrome.

Tests

npm run test:integration   # Test API + full article extraction
npm run test:models        # Test models
npm run test:unit          # Test regular JS
npm run test               # Test all of the above

Changes should be accompanied by tests. All tests located in /tests.

API Documentation

API Documentation is here.

Simple workflow

$ # create a book
$ curl http://localhost:3000/api/v1/books \
 -H "Content-Type: application/json" \
 -X POST \
 -d '{
    "title": "A title",
    "description": "A description",
    "author": "An author",
    "genre": "ebooks",
    "coverPath": "https://via.placeholder.com/600x800.jpg?text=A%20Cover",
    "urls": [
        "https://epub.press"
    ]
}'

{"id":"RXyGKmTq7"}
$ # download the book
$ curl -o book.ebub http://localhost:3000/api/v1/books/RXyGKmTq7/download
$ ls
book.ebub

Environment variables

Name Default Description
MAIL_SERVER_HOST Hostname of SMTP mail server
MAIL_SERVER_PORT Port of SMTP mail server
MAIL_SERVER_USERNAME Username for SMTP authentication
MAIL_SERVER_PASSWORD Password for SMTP authentication
MAIL_SENDER_ADDRESS noreply@epub.press Sender email address

About

πŸ“š Web service for creating ebooks from collections of websites.

Resources

License

Releases

No releases published
You can’t perform that action at this time.