{"id":21184930,"url":"https://github.com/msgflo/msgflo-example-imageresize","last_synced_at":"2025-07-03T19:36:02.913Z","repository":{"id":89976043,"uuid":"87233581","full_name":"msgflo/msgflo-example-imageresize","owner":"msgflo","description":"Example service for image resizing/scaling/thumbnails","archived":false,"fork":false,"pushed_at":"2017-04-20T16:45:41.000Z","size":68,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-21T12:46:58.298Z","etag":null,"topics":["example","image-optimization","image-processing","rabbitmq"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msgflo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-04T20:47:25.000Z","updated_at":"2020-11-09T06:16:02.000Z","dependencies_parsed_at":"2023-05-30T18:15:31.292Z","dependency_job_id":null,"html_url":"https://github.com/msgflo/msgflo-example-imageresize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgflo%2Fmsgflo-example-imageresize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgflo%2Fmsgflo-example-imageresize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgflo%2Fmsgflo-example-imageresize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msgflo%2Fmsgflo-example-imageresize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msgflo","download_url":"https://codeload.github.com/msgflo/msgflo-example-imageresize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243639416,"owners_count":20323505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","image-optimization","image-processing","rabbitmq"],"created_at":"2024-11-20T18:14:05.820Z","updated_at":"2025-03-14T19:49:26.651Z","avatar_url":"https://github.com/msgflo.png","language":"CoffeeScript","readme":"[![Build Status](https://travis-ci.org/msgflo/msgflo-example-imageresize.svg?branch=master)](https://travis-ci.org/msgflo/msgflo-example-imageresize)\n# MsgFlo example: Image resizing service\n\nExample of how to build a backend service for CPU-intensive tasks using [Msgflo](https://msgflo/org).\n\n![Architecture of the system](./doc/service-graph.png)\n\n## Deploying to Heroku\n\nThe absolutely quickest way to get running is to deploy the sevice to Heroku.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n## API\n\n`FIXME: document`\n\n* API. HTTP POST. JSON body. Array of images. URL and desired height/width. Returns 202 Accepted, with `Location`.\nRef. https://benramsey.com/blog/2008/04/http-status-201-created-vs-202-accepted/\n* Downloads image. Rescales. Uploads downscaled. Updates job status.\n\n## TODO\n\nMinimal\n\n* Add checks for successful job completion test\n\nBonus\n\n* Fix marking job status with completed\n* UI: Accept URLs\n\n\n## Running locally\n\n### Prerequisites\n\nThe following software needs to be preinstalled\n\n* Node.js 6+\n* Postgres 9.6+\n* RabbitMQ 3.6+\n\nAlso needed is an Amazon S3 bucket, and the associated credentials.\n\n### Download git repo\n\n    git clone https://github.com/msgflo/msgflo-example-imageresize.git\n    cd msgflo-example-imageresize\n\n### Install\n\n    npm install\n\n### One-time setup\n\nCreate the database\n\n    psql -c 'create database imageresize_test;' -U postgres\n\nRun database migrations and bind message queues\n\n    npm run setup\n\n### Configure\n\nConfigure Amazon S3 access\n\n    export IMAGERESIZE_S3_KEY=key\n    export IMAGERESIZE_S3_SECRET=secret\n    export IMAGERESIZE_S3_BUCKET=bucket\n\n### Run\n\nRun the entire service\n\n    npm start\n\n### Run tests\n\n    npm test\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsgflo%2Fmsgflo-example-imageresize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsgflo%2Fmsgflo-example-imageresize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsgflo%2Fmsgflo-example-imageresize/lists"}