1.12.1 • Published 8 years ago
jotunheimr v1.12.1
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 jotunheimrUsage
Environment Variables
PORT_WWW- server listening portALLOW_ORIGINS- allowed origins whitelist (comma seperated)AWS_ACCESS_KEY_IDAWS public keyAWS_SECRET_ACCESS_KEYAWS secret keyAWS_BUCKET_NAMEAWS S3 bucket nameAWS_BUCKET_PATHPath inside bucket
Start
npm startUpload
curl -X POST \
-H "Origin: http://example.com" \
-F image=@path/to/file.jpg \
http://localhost:4010/upload