Skip to content

Commit

Permalink
Move ImageKit configuration to .env
Browse files Browse the repository at this point in the history
  • Loading branch information
GorenganHunter committed May 12, 2023
1 parent 8e9028a commit f1ba674
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IMAGEKIT_PUBLICKEY=
IMAGEKIT_PRIVATEKEY=
IMAGEKIT_URLENDPOINT=
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Menfess
# Menfess
# Menfess
# Menfess

Copy file .env.example as .env and edit

ahhh gw gbs bahasa inggris anjir
8 changes: 5 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const multer = require('multer');
const fileupload = require('express-fileupload');
const FormData = require('form-data')

// Load .env file
require("dotenv").config()

// SDK initialization

Expand All @@ -24,9 +26,9 @@ let sqlMemes;

//TODO Make ImageKit
var imagekit = new ImageKit({
publicKey : "public_sfR8hcnPMIJ1ilavSLhv5IZiZ7E=",
privateKey : "private_eKrKi5RKb3/NijnWKF82mNgH4gA=",
urlEndpoint : "https://ik.imagekit.io/9hpbqscxd"
publicKey : process.env.IMAGEKIT_PUBLICKEY,
privateKey : process.env.IMAGEKIT_PRIVATEKEY,
urlEndpoint : process.env.IMAGEKIT_URLENDPOINT
});


Expand Down
57 changes: 55 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"license": "ISC",
"dependencies": {
"body-parser": "^1.20.1",
"bootstrap": "^5.3.0-alpha3",
"cookie-parser": "^1.4.6",
"crypto": "^1.0.1",
"dotenv": "^16.0.3",
"ejs": "^3.1.8",
"express": "^4.18.2",
"express-fileupload": "^1.4.0",
Expand Down

0 comments on commit f1ba674

Please sign in to comment.