{"id":16485170,"url":"https://github.com/mrspartak/granny-server-backend","last_synced_at":"2026-05-07T01:36:54.221Z","repository":{"id":150156363,"uuid":"238010186","full_name":"mrspartak/granny-server-backend","owner":"mrspartak","description":"👵 Granny.js - Server app","archived":false,"fork":false,"pushed_at":"2020-08-12T18:50:18.000Z","size":528,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T17:14:32.864Z","etag":null,"topics":["app","application","docker","image-blur","image-format","image-manipulation","image-processing","image-resizer","node-js","nodejs","picture","picture-upload","sharp","sharp-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrspartak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-02-03T16:29:45.000Z","updated_at":"2020-08-12T18:49:19.000Z","dependencies_parsed_at":"2023-06-10T11:45:54.168Z","dependency_job_id":null,"html_url":"https://github.com/mrspartak/granny-server-backend","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mrspartak/granny-server-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-server-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-server-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-server-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-server-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrspartak","download_url":"https://codeload.github.com/mrspartak/granny-server-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-server-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32719572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T00:29:05.620Z","status":"ssl_error","status_checked_at":"2026-05-07T00:28:57.074Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["app","application","docker","image-blur","image-format","image-manipulation","image-processing","image-resizer","node-js","nodejs","picture","picture-upload","sharp","sharp-library"],"created_at":"2024-10-11T13:24:25.381Z","updated_at":"2026-05-07T01:36:54.191Z","avatar_url":"https://github.com/mrspartak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple nodejs CDN server\n\nThis app supports uploading, delivering and manipulating images (resizing on the fly with cache)\n\n[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/assorium/granny-server-backend?style=for-the-badge \"Docker Cloud Automated build\")](https://hub.docker.com/r/assorium/granny-server-backend \"Docker Cloud Automated build\")\n[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/assorium/granny-server-backend?style=for-the-badge \"Docker Cloud Build Status\")](https://hub.docker.com/r/assorium/granny-server-backend \"Docker Cloud Build Status\")\n[![Docker Pulls](https://img.shields.io/docker/pulls/assorium/granny-server-backend?style=for-the-badge \"Docker Pulls\")](https://hub.docker.com/r/assorium/granny-server-backend \"Docker Pulls\")  \u003cbr/\u003e\n\n[![Latest Github tag](https://img.shields.io/github/v/tag/mrspartak/granny-server-backend?sort=date\u0026style=for-the-badge \"Latest Github tag\")](https://github.com/mrspartak/granny-server-backend/releases \"Latest Github tag\") \n[![Join the chat at https://gitter.im/granny-js/community](https://img.shields.io/gitter/room/granny-js/community?style=for-the-badge)](https://gitter.im/granny-js/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n## Ecosystem\n![image](https://user-images.githubusercontent.com/993910/74678258-8f250380-51cb-11ea-9b5e-1640e713380e.PNG)\n\n[granny-server-backend](https://github.com/mrspartak/granny-server-backend \"granny-server-backend\") - Backend service with API exposed to upload and serve/manipulate images  \n[granny-js-client](https://github.com/mrspartak/granny-js-client \"granny-js-client\") - Client library that works both in nodejs and browser. Makes API calls easier  \n[granny-server-frontend](https://github.com/mrspartak/granny-server-frontend \"granny-server-frontend\") - Frontend APP that uses client to manage your CDN domains and settings  \n[granny-server-cron](https://github.com/mrspartak/granny-server-cron \"granny-server-cron\") - Utility app  \n\n## Sample usage\nLet's say tou have new avatar to upload, and you want it to be avialable at path **/users/sergio.jpeg**  \nAfter you upload an image via API, the image is avialable at path **cdn.example.com/i/users/sergio.jpeg**  \nAnd now magic begins. Lets modify it! **cdn.example.com/i/height=100,width=100/_/users/sergio.jpeg** is of course resize on fly with cache  \n```\nResized image will be in cover mode. You can provide only one dimension too\n- width || w: Number\n- height || h: Number\n- resize || r: String (100x100 || 100, 100x200)\n\nProgressive image. Supported by jpeg, png\n- progressive || pr: No value\n\nQuality. Supported by jpeg, png, webp\n- quality || q: Number [1-100]\n\nFormat to convert\n- format || f: String [jpg|jpeg|png|webp]\n\nBlack and white\n- bw: No value\n\nBlur. Gaussian if number provided\n- blur: No value or Number [1-1000]\n```\n\n## Requirements\n- **MongoDB**  \n- **Nginx**\n- **S3** or [Minio instance](https://min.io/)\n\n## Environment variables\n    #port app will be launched at\n    const APP_PORT = process.env.APP_PORT || 3000\n    #mongo connection string\n    const MONGO = process.env.DEBUG || 'mongodb://localhost/js_cdn'\n    #S3 connection data\n    const S3_HOST = process.env.S3_HOST || '127.0.0.1'\n    const S3_PORT = process.env.S3_PORT || 9000\n    const S3_ACCESS_KEY = process.env.S3_ACCESS_KEY || 'minioadmin'\n    const S3_ACCESS_SECRET = process.env.S3_ACCESS_SECRET || 'minioadmin'\n    #start logging\n    const DEBUG = process.env.DEBUG || false\n    \n## Docker\n```\ndocker run -p 3000:3000 --name granny-server-backend \\\n  -e MONGO='mongodb://user@password:example.com/granny' \\\n  assorium/granny-server-backend:latest\n```\n\n## Nginx\nThis an example Nginx config for all CDN.* subdomains\nAll you need is to point your DNS A record to server IP and add domain via API or [granny-server-frontend](https://github.com/mrspartak/granny-server-frontend \"granny-server-frontend\") app\nThis is only an example. I recommend to use real CDN service such as free CloudFlare before your app, and it will serve and cache all your images across the globe.\n```\nserver {\n    listen 80;\n    charset UTF-8;\n        \n    server_name cdn.*;\n    \n    client_max_body_size 60m;\n    \n    location / {\n        proxy_pass http://127.0.0.1:3000;\n        proxy_set_header Host $host;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-NginX-Proxy true;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrspartak%2Fgranny-server-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrspartak%2Fgranny-server-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrspartak%2Fgranny-server-backend/lists"}