-
Notifications
You must be signed in to change notification settings - Fork 0
/
cld-config.nnb
37 lines (37 loc) · 1.39 KB
/
cld-config.nnb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"cells": [
{
"language": "markdown",
"source": [
"## Prepare to use Cloudinary Node.js SDK \n- initialize NPM\n- `npm install cloudinary dotenv`\n- add CLOUDINARY_URL=cloudinary://API_KEY:API_SECRET@CLOUDNAME to .env file\n- run `npm i --save-dev @types/node` "
],
"outputs": []
},
{
"language": "markdown",
"source": [
"### Cofingure Cloudinary with API_KEY, API_SECRET and CLOUD_NAME by reading CLOUDINARY_URL from hidden .env file\n\nConfigure Cloudinary by supplying the SECRET, KEY, and CLOUD_NAME as individual items in an object, but Cloudinary\ncan parse these items from the CLOUDINARY_URL."
],
"outputs": []
},
{
"language": "typescript",
"source": [
"require('dotenv').config();\nconst cld = require('cloudinary').v2;\nconsole.log(cld.config().cloud_name)"
],
"outputs": [
{
"items": [
{
"mime": "application/vnd.code.notebook.stdout",
"value": [
"picturecloud7",
""
]
}
]
}
]
}
]
}