Backend server for EpubPress.
For clients, see epub-press-clients.
git clone https://github.com/haroldtreen/epub-press
cd epub-press
npm installDocker Setup
- Install Docker
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
- Install Docker
docker-compose up postgresnpm 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.
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 aboveChanges should be accompanied by tests. All tests located in /tests.
| Description | Endpoint |
|---|---|
| Create a book | POST /api/v1/books |
| Check the status of an in progress book | GET /api/v1/books/:id/status |
| Download an ebook as a file | GET /api/v1/books/:id/download |
| Send the ebook to an email | GET /api/v1/books/:id/email |
| Check versions compatible with the server | GET /api/v1/version |
| 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 |