omar214 / image-processing-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image-processing-API

🚩About

first project for udaacity advanced full-stack nano-degree

it's a simple image processing API that can be used to process images.

🏁Scripts

  • npm run build to compile ts files
  • npm run test to run the test
  • npm run start to start the server
  • npm run dev to start development
  • npm run format to run prettier
  • npm run lint to run the linter
  • npm run lint:fix to run the linter to fix

API

{baseURL}/api/image?imageName=<image Name>&&width=<width>&&height=<height>

query parameters: imageName: the name of the image width: the width of the image height: the height of the image

🏁Getting Started

  1. Clone the repository
git clone https://github.com/omar214/image-processing-API.git
  1. Go to the directory of the repository
cd image-processing-API
  1. install dependencies
npm install

4.add .env file

PORT = 5000;
  1. Run the server
npm start

TODOs

  • configute TS

  • configute prettier

  • configute ESLint

  • api route

    • validate request
    • validate is image exists
    • do resize logic
    • handle path better way
  • do cache logic

    • if 1st time do resize
    • if not first time send the cached image
  • send the file

  • handle if cached file is not found

  • configure jasmine

  • add tests

  • status code 304 when image is cached

  • lint

  • format

  • build

  • documentation

About


Languages

Language:TypeScript 94.4%Language:JavaScript 5.6%