Udagram is a simple cloud application developed alongside the Udacity Cloud Engineering Nanodegree. It allows users to register and log into a web client, post photos to the feed, and process photos using an image filtering microservice.
This submission is for deploying a simple image filtering service using AWS ElasticBeanStalk service.
The starter code is available below: The Image Filtering Microservice
You'll need to create a new node server. Open a new terminal within the project directory and run:
- Initialize a new project:
npm i
- run the development server with
npm run dev
The starter code has a task for you to complete an endpoint in ./src/server.ts
which uses query parameter to download an image from a public URL, filter the image, and return the result.
We've included a few helper functions to handle some of these concepts and we're importing it for you at the top of the ./src/server.ts
file.
import { filterImageFromURL, deleteLocalFiles } from "./util/util";
Follow the process described in the course to eb init
a new application and eb create
a new environment to deploy your image-filter service! Don't forget you can use eb deploy
to push changes.
In order to do a request for image filtering, you need to be authenticated using a JWT token.
- A token can be requested using a post request the api
/token
with a body (ex:{"name": "YOUR_NAME"}
) - Copy
token
field from the response - Use this key in your request example
Bearer [TOKEN]
. Replace[TOKEN]
with the one you copied previously. - A request parameter
image_url
with the value, the url of the image to filter.GET /filteredimage?image_url={{URL}}
Some screenshots are available inside deployment_screenshot
folder