-
-
# 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
-
-
-
# 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
-
docker-compose run --rm node npm install --legacy-peer-deps
-
-
-
# 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
-
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
You must install image optimizer Frontend.