Skip to content

Files

Latest commit

Oct 23, 2024
629fa70 · Oct 23, 2024

History

History

node-transformations-effects

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 15, 2023
Oct 21, 2022
Oct 28, 2022
May 21, 2024
Oct 23, 2024
Oct 21, 2022
May 15, 2023
May 15, 2023
May 15, 2023

README.md

Transformations & Effects in Node.js with Cloudinary Node.js SDK

🧰 Using the SDK in a Node project

To use the SDK in a Node project, first import library:

const cloudinary = require('cloudinary').v2;
# or
import { v2 as cloudinary } from 'cloudinary'

Then configure a new instance of Cloudinary:

cloudinary.config({
  cloud_name: '<Your Cloud Name>'
});

Where you can generate a Cloudinary URL by using the cld.image method such as:

cloudinary.url('<Your Public ID>')

🚀 Get Started with This Example

  • Create an environment variable file .env and inside add:
CLOUDINARY_CLOUD_NAME="<Your Cloud Name>"
  • Install the project dependencies with:
npm install
  • Run the node script with:
node <filename>

For example, inside the examples/node-transformations-effects directory:

node image-overlay.js

The script will run in your terminal and you'll see the URL results logged.