Skip to content

msgflo/msgflo-example-imageresize

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
doc
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Example service for image resizing/scaling/thumbnails

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published