Skip to content

feat: Added CC Compressor Sample #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cc-compressor-sample/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
43 changes: 43 additions & 0 deletions cc-compressor-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# CC Compressor Sample
This plugin is an example NodeJS app that you could deploy to a company server where you can select an image from my Libraries and then download a "web-optimised", minimised (by the server, e.g., via a TinyPNG API or something similar) rendition in a specific resolution.

## Install dependencies

First ensure that your terminal is in the root of this project. Then:

For `yarn` users, install all dependencies using:

```
yarn install
```

For `npm` users, install all dependencies using:

```
npm install
```

## Firestore Setup

Next, you need to create a `.env` file containing all the variables. Enter all variables from your Firebase project:

```sh
{
echo 'SESSION_SECRET='
echo 'API_KEY='
echo 'API_SECRET='
echo 'PORT='
echo 'TINIFY_API_KEY='

} >> .env
```

## Launch the project

Run the following command for running the backend:

```sh
npm run dev
```

> Note: On following the above steps, the project will run on your localhost server using `http` protocol. To use `https` please follow [this blog](https://web.dev/how-to-use-local-https/).
Loading