{"id":25164167,"url":"https://github.com/heroku-examples/node-asciify","last_synced_at":"2025-08-23T11:09:32.180Z","repository":{"id":32921377,"uuid":"36516876","full_name":"heroku-examples/node-asciify","owner":"heroku-examples","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-24T23:15:26.000Z","size":55,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-23T11:07:10.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/heroku-examples.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}},"created_at":"2015-05-29T16:46:36.000Z","updated_at":"2023-01-16T23:45:57.000Z","dependencies_parsed_at":"2022-08-02T00:59:44.315Z","dependency_job_id":null,"html_url":"https://github.com/heroku-examples/node-asciify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heroku-examples/node-asciify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku-examples%2Fnode-asciify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku-examples%2Fnode-asciify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku-examples%2Fnode-asciify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku-examples%2Fnode-asciify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroku-examples","download_url":"https://codeload.github.com/heroku-examples/node-asciify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku-examples%2Fnode-asciify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746767,"owners_count":24813582,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-09T04:19:35.101Z","updated_at":"2025-08-23T11:09:32.103Z","avatar_url":"https://github.com/heroku-examples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ASCIIfy\n\nThis project demonstrates a non-trivial app with\n[container-build](https://devcenter.heroku.com/articles/build-and-run-heroku-apps-locally-with-docker?preview=1).\n\n## Quick Start\n\n- Install [Docker](https://www.docker.com/)\n- Check that docker is available in your terminal (`docker ps`)\n\n```\n$ heroku plugins:install container-build\n$ git clone https://github.com/heroku-examples/node-asciify.git\n$ cd node-asciify\n$ heroku create\n$ heroku addons:create heroku-redis\n$ heroku addons:create heroku-postgresql\n$ heroku _container:build\n$ heroku _container:run --config\n```\n\nNow open [http://localhost:5000](http://localhost:5000).\n\nThen, in a new terminal:\n\n```\n$ cd node-asciify\n$ heroku _container:run --type worker --config\n```\n\nNow, you have two local dynos running: `web` and `worker`.\nYour [local server](http://localhost:5000) should be able to turn images into ASCII art.\n\nTest some images:\n\n- http://static.comicvine.com/uploads/original/14/147508/4716538-the_avengers___ironman_by_stephencanlas-d4zpaxl.jpg\n- http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2013/4/30/1367315381079/1990-TEENAGE-MUTANT-NINJA-011.jpg\n- http://fc08.deviantart.net/fs70/f/2011/072/0/f/shadow_across_her_face_by_hattori_hanzo_2010-d3bjg74.jpg\n\n## Deploy\n\nOnce you're done working locally, deploy to Heroku:\n\n```\n$ heroku _container:build\n$ heroku _container:push\n$ heroku scale worker=1\n$ heroku open\n```\n\n## All the Moving Parts\n\nASCIIfy is composed of four parts and is intentionally modular to\nillustrate how Heroku-Docker helps manage complexity:\n\n- web (node.js)\n- worker (node.js)\n- postgres (db - processed images)\n- redis (queue - pending images)\n- graphicsmagick (custom binary)\n\nASCIIfy also needs graphicsmagick, which isn't built into Heroku's Cedar-14 stack.\nWe extend the stack to support the app by adding the dependency to `heroku.yml`.\n\n## Compared to a standard deploy\n\nTry this with a new Heroku app:\n\n```\n$ git remote rm heroku\n$ heroku create\n$ heroku addons:create heroku-postgresql\n$ heroku addons:create heroku-redis\n$ git push heroku master\n$ heroku scale worker=1\n$ heroku open\n```\n\nThis app will never process images because the worker crashes when trying to locate graphicsmagick.\n\n## Compared to a Dockerfile deploy\n\nIn order to deploy this with a Dockerfile,\nyou'll need to first write an appropriate Dockerfile.\n\nThen you'll need to use Docker locally to build the image,\nthen tag the image,\nthen push the image to Heroku's container registry.\n\nFrom then on, you'll have to maintain the runtime,\nnpm version, security, etc based on the Dockerfile you've written.\n\nGood luck!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku-examples%2Fnode-asciify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroku-examples%2Fnode-asciify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku-examples%2Fnode-asciify/lists"}