Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 1.82 KB

README.md

File metadata and controls

49 lines (40 loc) · 1.82 KB

Image optimization service

CI Build

Development

  • Use current node version from .nvmrc file $> nvm install, or make sure you've at least Node 12.x installed
  • Next run $> npm install
  • Start Dev server with $> npm run dev
  • Open the sample HTML example in browser. examples/frontend/simple-resize.html
  • For Production ready build: $> npm run build && npm start

API

  • In HTML; use
<img src="http://image-optimizer-service/widthxheight/https://path-to-hosted-image.jpg" >
  • HTTP request:
$> curl --request GET -sL \
     --url 'http://image-optimizer-service/widthxheight/https://path-to-hosted-image.jpg' \
     --output './path/to/file'

Roadmap

  • NodeJS API-first microservice; created using personal template repository
  • Health check endpoints
  • CI checks for build
  • Happy scenario image fetching and resizing API using Sharp
  • Dockerfile
  • Added security layer (with URL tokens and/or hashing)
  • Usage patterns: (e.g with CDN, with caching layer and proxy-server, serverless approach)
  • Telemetry support
  • Logging Middleware
  • API versioning
  • Deployment descriptors
  • Continuous Deployments support

Caveats

TBD

On the shoulders of Giants

This NodeJS implementation is far from done. It's inspired by years of working and tinkering with other solutions such as:

Long live and prosper