GithubHelp home page GithubHelp logo

dekiakbar / image-optimizer Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.84 MB

Imageoptimizer image is a simple app for compressing any image file. It takes a single input file and compresses it to a much smaller output file.

Home Page: https://api-imageoptimizer.nooby.dev/api

License: MIT License

JavaScript 1.74% TypeScript 98.26%
image-processing nestjs nestjs-backend nodejs optimize-images api api-rest nestjs-api

image-optimizer's Introduction

Image Optimizer Backend

Build Deploy Lint Build


Table of Contents

Installation

Backend (this repo)

  • Without docker

    •   # Clone this repository
        git clone https://github.com/dekiakbar/image-optimizer
    •   # Navigate to project dir
        cd image-optimizer
    •   # Install node modules and dependencies
        npm install
    •   # Run app
      
        # development
        $ npm run start
      
        #  Watch mode
        $ npm run start:dev
      
        # production mode
        $ npm run start:prod
    •   # access swager api
        http://localhost:<port>/api
  • Docker

    •   # Clone this repository
        git clone https://github.com/dekiakbar/image-optimizer
    •   # Navigate to project dir
        cd image-optimizer
    •   # Build image and start container
        docker-compose up -d
    •   # access swagger api
        http://localhost:3000/api
    • NOTE : if you wanna run npm command, please use this.

      docker-compose run --rm node npm install --legacy-peer-deps

Deployment

  • Docker

    •   # Clone this repository
        git clone https://github.com/dekiakbar/image-optimizer
    •   # Navigate to project dir
        cd image-optimizer
    •   # Build image and start container
        docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Environment Variable

Copy env.example to .env

cp .env.example .env

Fill the required env variables:

PORT=3000

# Storage type for save image
# valid :
# - S3
STORAGE_TYPE=S3

# if use S3 as storage
S3_BUCKET_NAME=
S3_REGION=global
S3_ENDPOINT=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=

# separated by space and please provide (dot) before list the extension
ALLOWED_FILE_TYPE=.jpeg .jpg .png
MAX_FILE_UPLOAD=5
# max upload size in KB
MAX_UPLOAD_SIZE=8192

Frontend

You must install image optimizer Frontend.

License

MIT

image-optimizer's People

Contributors

dekiakbar avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

image-optimizer's Issues

Update unit test

Update unit test
Update github action workflow to run link and build only if test completed

Deploy only when merged to master

current state :

  • if PR is opened will trigger github action to deploy
  • if PR is merged will also trigger github action to deploy which is make deployment

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.