Git Product home page Git Product logo

image-processing-api-udacity's Introduction

Scripts

  • Install: npm install
  • Build: npm run build
  • Lint: npm run lint
  • prettier: npm run prettier
  • Run unit tests: npm run test
  • Start server: npm run start

Usage

The server will listen on port 3000:

Brief instructions

http://localhost:3000/

Endpoint to resize images

http://localhost:3000/api/images

Expected query arguments are:

  • filename: Available filenames are:

    • fjord
  • width: numerical pixel value > 0

  • height: numerical pixel value > 0

Example 1

http://localhost:3000/api/images Will display a hint and list available image names

Example 2

http://localhost:3000/api/images?filename=fjord Will display the original fjord image.

Example 3

http://localhost:3000/api/images?filename=fjord&width=200&height=200 Will scale the fjord image to 200 by 200 pixels and store the resulting image. On subsequent calls will serve the resized image instead of resizing the original again.

Example 4

http://localhost:3000/api/images?filename=fjord&width=-200&height=200 Invalid width parameter that will be hinted to.

Example 5

http://localhost:3000/api/images?filename=fjord&width=200 Missing height parameter that will be hinted to.

Notes

  • Images are served from assets/images/full. Further images with the extension can be put into that directory, but the filetype is not checked (not required in exercise).
  • Image thumbs will be stored in assets/images/thumb and can be deleted from there to verify that in that case they will be re-created on subsequent calls to the same endpoint.

image-processing-api-udacity's People

Contributors

abdullahelanouz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.