Given a public image URL as query parameter to a REST API, this server application will download the image, do some image processing, then deliver the processed image file.
The response status codes are indicated closely to the REST API standard guidelines.
Written in Node.js using TypeScript language with Express framework. All image processing is done entirely in Node.js without extra dependency.
Provided necessary configuration to transpile TypeScript to JavaScript and package for deploying on Amazon Web Services - Elastic Beanstalk
A project for Udacity's Cloud Developer Nanodegree
Image Filtering endpoint: HOST/filteredimage?image_url=
IMAGE_URL
Example:
http://image-filtering-microservice-dev.us-west-2.elasticbeanstalk.com/filteredimage?image_url=https://timedotcom.files.wordpress.com/2019/03/kitten-report.jpg
You'll need to create a new node server. Open a new terminal within the project directory and run:
- Install depedencies:
npm install
- Run the development server:
npm run dev
- Manually test the endpoints or use Postman with the provided config
cloud-cdnd-c2-final.postman_collection.json
Tip: Edit Collection in Postman to change the path of the variable HOST to test your deployed enpoint.
- Set up AWS CLI and EB CLI with your appropriate credentials
- Create deployment artifact www/Archive.zip:
npm run build
- Create initial Elastic Beanstalk application:
eb create
- For load balancer: choose application
- Everything else can be default
- Deployed location will show in the command output, otherwise, find in AWS console / Elastic Beanstalk (choose the correct region to see the deployed application)
- Make sure the VPC of the application allows public inbound so that it can be accessible from the outside world
- Whenever having new changes to deploy again:
npm run build
eb deploy
Copyright © 2019 Nikyle Nguyen