Public | Automated Build

Last pushed: 2 months ago
Short Description
Microservice for processing images and uploading them to a designated bucket on AWS S3
Full Description

Jötunheimr







From Jötunheimr, the giants menace the humans in Midgard and the gods in
Asgard. The river Ifing separates Asgard, the realm of the gods, from
Jötunheimr, the land of giants. Gastropnir, home of Menglad, and Þrymheimr,
home of Þjazi, were both located in Jötunheimr, which was ruled by King Thrym.
Glæsisvellir was a location in Jötunheimr, where lived the giant Gudmund,
father of Höfund. Utgard was a stronghold surrounding the land of the
giants.

This Node.JS microservice processes images before uploading them to a designated
bucket on AWS S3. Utilizing express for
handling requests, and
node-s3-uploader for
resizing and uploading to AWS S3.

Features

  • REST API
  • CORS support
  • Image type validation
  • Image resizing
  • Image color space conversion
  • Image auto orientate
  • AWS S3 upload

Install

npm install jotunheimr

Usage

Environment Variables

  • PORT_WWW - server listening port
  • ALLOW_ORIGINS - allowed origins whitelist (comma seperated)
  • AWS_ACCESS_KEY_ID AWS public key
  • AWS_SECRET_ACCESS_KEY AWS secret key
  • AWS_BUCKET_NAME AWS S3 bucket name
  • AWS_BUCKET_PATH Path inside bucket

Start

npm start

Upload

curl -X POST \
  -H "Origin: http://example.com" \
  -F image=@path/to/file.jpg \
  http://localhost:4010/upload

MIT lisenced

Docker Pull Command
Owner
turistforeningen
Source Repository