diff --git a/.env.example b/.env.example index e453d29..f066e5b 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,9 @@ IMAGEKIT_PUBLIC_KEY= IMAGEKIT_PRIVATE_KEY= URL_ENDPOINT= +# 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 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e5da8a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Deki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 9fe8812..ba4d781 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,74 @@ -

- Nest Logo -

- -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 -[circleci-url]: https://circleci.com/gh/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -CircleCI -Coverage -Discord -Backers on Open Collective -Sponsors on Open Collective - - Support us - -

- - -## Description - -[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. +# Image Optimizer Backend + +Image Optimizer Backend is a application for [image optimizer frontend](https://github.com/dekiakbar/image-optimizer-fe). Build by [Nest Js](https://nestjs.com/) ## Installation +this project created use the following tool +> node version : v16.6.1 + +> npm version : 7.20.5 + +### Backend (this repo) + +Clone this repository + ```bash -$ npm install +git clone https://github.com/dekiakbar/image-optimizer ``` -## Running the app +Navigate to project dir ```bash -# development -$ npm run start +cd image-optimizer +``` -# watch mode -$ npm run start:dev +Install node modules and dependencies -# production mode -$ npm run start:prod +```bash +npm install ``` -## Test +### Frontend Clone this repository + +You must install [image optimizer Frontend](https://github.com/dekiakbar/image-optimizer-fe). +## Environment Variable + +Copy `env.example` to `.env` + +```bash +cp .env.example .env +``` + +Fill the required `env` variables: +> note: get Imagekit key from [Imagekit.io](https://imagekit.io/) ```bash -# unit tests -$ npm run test +PORT=3000 -# e2e tests -$ npm run test:e2e +IMAGEKIT_PUBLIC_KEY= +IMAGEKIT_PRIVATE_KEY= +URL_ENDPOINT= -# test coverage -$ npm run test:cov +# 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 ``` -## Support +## Running the app -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). +```bash +# development +$ npm run start -## Stay in touch +# watch mode +$ npm run start:dev -- Author - [Kamil Myƛliwiec](https://kamilmysliwiec.com) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) +# production mode +$ npm run start:prod +``` ## License - -Nest is [MIT licensed](LICENSE). +[MIT](https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt) \ No newline at end of file