Example service for image resizing/scaling/thumbnails
CoffeeScript CSS HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
doc
graphs
migrations
participants
src
tests
.gitignore
.travis.yml
README.md
app.json
browser.js
config.coffee
db.coffee
guvscale.yaml
index.js
knexfile.coffee
package.json
webpack.config.js

README.md

Build Status

MsgFlo example: Image resizing service

Example of how to build a backend service for CPU-intensive tasks using Msgflo.

Architecture of the system

Deploying to Heroku

The absolutely quickest way to get running is to deploy the sevice to Heroku.

Deploy

API

FIXME: document

TODO

Minimal

  • Add checks for successful job completion test

Bonus

  • Fix marking job status with completed
  • UI: Accept URLs

Running locally

Prerequisites

The following software needs to be preinstalled

  • Node.js 6+
  • Postgres 9.6+
  • RabbitMQ 3.6+

Also needed is an Amazon S3 bucket, and the associated credentials.

Download git repo

git clone https://github.com/msgflo/msgflo-example-imageresize.git
cd msgflo-example-imageresize

Install

npm install

One-time setup

Create the database

psql -c 'create database imageresize_test;' -U postgres

Run database migrations and bind message queues

npm run setup

Configure

Configure Amazon S3 access

export IMAGERESIZE_S3_KEY=key
export IMAGERESIZE_S3_SECRET=secret
export IMAGERESIZE_S3_BUCKET=bucket

Run

Run the entire service

npm start

Run tests

npm test